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/
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:
From the provider list, select Microsoft OLE DB Provider for ODBC Drivers, and click Next>>:.
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:
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>.
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.
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
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.
|