0
Items : 0
Subtotal :  0.00
View CartCheck Out
Chennai
Chennai
Singapore
Mumbai
Switzerland
+91 44 4091 2000 Mon - Fri 09:00 - 18:30 766/1, TEZ, Sakthi Towers 1, Anna salai, Chennai 600 002.
+6584181583 Mon - Fri 09:00 - 18:30 68 Circular Road, #02-01, 049422, Singapore.
+91 98848 35702 Mon - Fri 09:00 - 18:30 5, Powai Lake Heights, Mumbai 400 072
+41 (0)91 225 81 00 Mon - Fri 09:00 - 18:30 Equvera - ISV Techno SAGL, Via Ligornetto 6A, 6855 Stabio, Switzerland
Ceritified
ISO 9001:2018
The Best
#1 in India
#1 in Europe
#1 in Asian-pacific
Number #1
AUTOMATION SOLUTION PROVIDER
Talk to an Expert
0
Items : 0
Subtotal :  0.00
View CartCheck Out

DDE to MySQL: Writing DDE to MySQL database

DDE TO MYSQL: WRITING DDE TO MYSQL DATABASE

Configuring how to write DDE data to a MySQL database is very much similar to configuring how to write data to MSSQL. Only main differences are described in this manual.

1. Download and install the 32-bit version of MySQL ODBC Connector (the ODBC driver) for MySQL from mysql.org.

dde-to-mysql1

Fig. 1 Driver section

2. The structure of a table in the database will look like this:

2.1 In case of writing a lot of DDE items

CREATE TABLE `dde_data` ( `REC_ID` int(11) NOT NULL AUTO_INCREMENT, `TIMESTAMP` datetime DEFAULT NULL, `ITEM_NAME` varchar(25) NOT NULL, `ITEM_VALUE` varchar(255) DEFAULT NULL, PRIMARY KEY (`REC_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

2.2 In case of writing several DDE items

CREATE TABLE `dde_data_2` ( `REC_ID` int(11) NOT NULL AUTO_INCREMENT, `TIMESTAMP` datetime NOT NULL, `ITEM1` varchar(30) DEFAULT NULL, `ITEM2` varchar(30) DEFAULT NULL, PRIMARY KEY (`REC_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

If you specify any other data type than String for ITEM1 or ITEM2 in the DDE settings, you should create the columns of the corresponding types while creating a table.

3. Create an ODBC data source for your MySQL database.

4. During “Binding”, you should take into account that the names of the table and its columns are case-sensitive in MySQL.