Page 1 of 1

MySQL DB connection problem through ADO

PostPosted: Sun 19. Jan 2020 7:31:23
by mister_b
Dear Gentlemen,
I need to connect Promotic to MySQL database called 'iws' locally hosted in the same computer (Windows 10 x64 desktop).I tried the example that comes with the ADO object,Whenever I open the test panel in the example and try to open the table in the database it is throwing me that db is not open. I even tried different connection strings but no sequel. can somebody help me solve this issue

Connection String that I tried:
1) Server=myServerAddress;Port=3306;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
2)Provider =MySQLProv;Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;


Re: MySQL DB connection problem through ADO

PostPosted: Thu 06. Feb 2020 13:49:30
by Kazimierz Heczko
Correct connection string to MySQL database depends on version of the ODBC driver you have installed on the system. I recommend you to check page:, where you can find recommended connection strings for different databases, form MySQL too. PROMOTIC can use ODBC or OLEDB drivers, therefore you have to use any of the examples in these sections. Another important thing is, if you use 32-bit or 64-bit of PROMOTIC. And I can say, you have to use 32-bit driver to the database if you use 32-bit version of PROMOTIC (don't matter if you use 32-bit or 64-bit OS version).
Final connection string for MySQL database should be i.e.:
Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost;Port:3306;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;

where Driver name have to be the same as you see in ODBC data sources manager.