Hello,
I tried to get a connection to mySQl using ADO.
Here is my code:
(ADOConnection is of type: 'Microsoft ActiveX Data Objects 2.8 Library'.Connection)
CREATE(ADOConnection);
ADOConnection.ConnectionString('Driver={MySQL ODBC 3.51 Driver}; SERVER=mysrv; PORT=3306; ' +
'Database=mydb; User=main; Password=mainxyz; Option=3;');
ADOConnection.Open;
Following error comes up:
>This message is for C/AL programmers:
>The call to member Open failed. Provider returned the following message:
>Schwerwiegender Fehler (fatal error)
Any ideas what is not correct?
The user, password, etc, is ok, it works with simple ODBC DSN)
Is it a version issue?
Which version of mySQL database I have to have to make it work?
(I use ADO 2.7 and mySQL 4.1.13)
I saw code snippets here together with mySQL so it seems to work that one can access mySQL using ADO.
But why does my code not work?
Thy mySQL log shows the connection command without any error so it must be somewhere in ADO / Navision?
Thanks for any help!
0
Comments
An ages ago I met similar problem, because driver doesn't support some settings combinations.
thanks for reply.
I created a user DSN (mySQL 3.51...) and tried to use it under Excel.
But same error, so it's not Navision, but what is it then?
I saw already posts here, where members could get a mySQL ADO connection work, because the had problems like e.g. converting data, or similar, but the connection was already made.
So it must be possible to create an ADO connection to mySQL, but HOW?
Any further ideas? Thanks!
I downloaded the latest ODBC connector (3.51.12), from:
http://dev.mysql.com/get/Downloads/MyODBC3/mysql-connector-odbc-3.51.12-win32.zip/from/pick
installed it and now it works fine for me!
Just for someone who has similar problems, good luck!