Hi,
I’m trying to connect from NAV2009 to a MySQL database. I’ve installed the MySQL ODBC driver and also the MySQL Connector/NET driver.
The ODBC connection works successfully when I use the following connection string (assigned to a variable of type 'Microsoft ActiveX Data Objects 2.8 Library'.Connection):
ADOConnection.ConnectionString('Driver={MySQL ODBC 5.1 Driver}; server=127.0.0.1;PORT=3306;database=testdb;User=navread;Password=navreadpwd');
However, I’d like to connect via Connector/Net. I’ve tried the following connection string:
ADOConnection.ConnectionString('Provider=MySQLProv;Data Source=localhost;Initial Catalog=testdb;User ID=navread;Password=navreadpwd;');
However, I get an error from NAV when this is run:
Microsoft Dynamics NAV Classic
This message is for C/AL programmers: The call to member Open failed. ADODB.Connection returned the following message: Provider cannot be found. It may not be properly installed.
I've verified that MySQL Connector/NET has been installed. All the examples indicate that the Provider Name is supposed to be "MySQLProv", but I don't know if there's a way to verify that. I'm using MySQL Connector/Net 6.4
Has anyone done this and been successful?
Thanks
Ron
Comments
Have you installed MDAC latest version on machine?
Technical Consultant
The version of MDAC is 2.8.1132, which I'm reasonably certain is 2.8 SP1, the latest version of MDAC. I didn't think that MDAC has changed in the last few years - the Microsoft Download site says that MDAC 2.8 was released in 2005, so I'm assuming that the current install is the latest. But I will try to verify that 2.8 SP1 is 2.8.1132.
Ron
Just something to watch out for.
Epimatic Corp.
http://www.epimatic.com
Any luck with that error?
"Provider cannot be found. It may not be properly installed."
I'm getting the same thing...
I ended up going with the ODBC connector - it's been working fine for more than a year.
However, if you want to try some other strings, here's some from a great website I found: http://www.connectionstrings.com - it has sample connection strings with dozens of optional parameters. If you want to get into some esoteric combinations, try that website - it has strings for MySQL, SQLServer, Oracle, Sybase, DB2 and others.
Standard
Server=testserver;Database=dbtest;Uid=userid;Pwd=userpwd;
Specifying TCP port
Server=testserver;Port=3306;Database=dbtest;Uid=userid;Pwd=userpwd;
Good luck!
Ron