Sun MySQL database

Top  Previous  Next

ComCap has been tested against Sun MySQL v5.1 community edition, using the 'Connector/OBBC 3.51 driver' from http://dev.mysql.com/downloads/
Note the 'ODBC 5.1' driver does not seem to work with ComCap, nor does the 'MySQL OLEDB Provider'.

 

Sample Database Tables

The database table to which ComCap data will be written must be created before ComCap can be configured, and the database must be running.

 

ComCap  includes Sample Database SQL scripts to create empty tables and stored procedures, for IBM DB2 this is the file newdb-ibmdb2.sql One of the IBM tools may be used to run the script into DB2, or Universal SQL Editor is recommended. Note that writing using stored procedures has not been tested.

 

Setting Up a Database Connection

On the Capture Settings, Database tab, choose Database Type as ADO, then click the Specify Database button displays the MDAC Data Link Properties dialog, showing a list of installed data providers:

 

cm5-dbmy-provider

 

From the provider list, select Microsoft OLE DB Provider for ODBC Drivers, and click Next>>:.

 

cm5-dbmy-conn

 

On the Connection tab, choose Use Connection String and click the Build button.  A Select Data Source dialog will appear (shown below) from which an existing ODBC connection for MySQL may be chosen, or the New button clicked to create a new data source:

 

cm5-dbmy-odbc1

 

The Create New Data Source window will appear with a list of data sources, select MySQL ODBC 3.51 Driver (not 5.1 Driver) and click Next>.

 

cm5-dbmy-odbc2
The next window asks for the directory location and name with which to save the ODBC connection, click Next> again will display a summary page, from which OK should be clicked, which will then display a further Connector/ODBC dialog:

 

cm5-dbmy-odbc3
This driver connector dialog should have the server and logon details supplied, then click OK.
 

cm5-dbmy-odbc4

 

You are then back on the Select Data Source dialog with your new Data Source Name (DSN) being shown, click OK and you are back on the Data Link Properties dialog.

 

cm5-dbmy-odbc5

 

Specify authentication to logon to the database, and then the actual database to be used.  Click Test Connection to make sure SQL is working, then OK

 

cm5-dbmy-tab

 

ComCap will then open the database and the details will be displayed to confirm it’s all working OK.  ComCap can either insert data directly into a table, or pass data to a stored procedure that may manipulate the data and insert it into one or more tables.  When you choose 'How to Add Records', a list of either SQL Tables or Stored Procedures will appear, from which one should be chosen. The list of stored procedures will include lots beginning sp_ but these should be ignored.  How the data is chosen for the database is specified on the Data Format tab. Other settings on this tab are detailed at Database tab.

 

Backslash Issue

There is a potential problem with old versions of MySQL that treat the backslash character as the first of an escape sequence (ie \f is form feed).  The Database tab has an Escape Backslash option sends \ as \\ so MySQL saves it as \ instead of reporting a syntax error. Newer versions of MySQL have a configuration option to disable escape sequences.