You are not logged in.
Pages: 1
Topic closed
I am unable to connect my database with the logic.Attached Image is self explanatory.
Offline
Hi soxso2011,
additional information is always helpful and appreciated. Where is RexCore running? On the same Windows machine or somewhere else, e.g. Raspberry Pi? Can you connect to the MySQL server from command line?
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Yes, MySQL is running on same computer, Also its accessible from command line. What is the error which is appearing in log indicating?
Offline
Hi soxso2011,
the error means that there is no valid ODBC driver called "MySQL" (DRIVER=MySQL in your .rio file). On a typical Windows machine, the driver is "MySQL ODBC 5.3 Unicode Driver". You must have 32-bit ODBC Connector installed, get it here: https://dev.mysql.com/downloads/connector/odbc/
You need 32-bit version because REX is a 32-bit application.
To check the driver name, run C:\Windows\SysWOW64\odbcad32.exe, select the Drivers tab and look for MySQL. My Windows are in Czech so the screenshot probably does not help much, but I hope it's better than nothing:
Let me know if you need additional information.
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
I checked it all , attached images.This time I am using the program shared by you.Same error still persists!
https://www.rexygen.com/oldforum/img/m … 1/code.png
https://www.rexygen.com/oldforum/img/m … 1/odbc.png
https://www.rexygen.com/oldforum/img/m … rogram.png
Last edited by soxso2011 (2016-10-18 13:33:07)
Offline
Hi soxso2011,
thanks for the screenshots. On Windows you need to use the following in your .rio file:
Connection "DRIVER=MySQL ODBC 5.3 Unicode Driver;SERVER=127.0.0.1;...
Your setting DRIVER=MySQL is valid only for Linux systems.
My original reply was not stating this clearly. Hope this helps.
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed