mibuso.com

Microsoft Business Solutions online community
It is currently Mon May 20, 2013 6:41 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: ADO and mySQL problem
PostPosted: Thu Feb 08, 2007 4:12 pm 
Offline

Joined: Fri Mar 24, 2006 2:50 pm
Posts: 24
Location: Germany
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!


Top
 Profile  
 
 Post subject: Hint
PostPosted: Thu Feb 08, 2007 4:34 pm 
Offline

Joined: Tue Jul 13, 2004 3:49 pm
Posts: 245
Location: Prievidza
Country: Slovakia (sk)
I think that Navision don't causes problem. Try to use the same connection string from other environment (VB, Excel, ...).
An ages ago I met similar problem, because driver doesn't support some settings combinations.


Top
 Profile  
 
 Post subject: Thanks, but...
PostPosted: Thu Feb 08, 2007 5:14 pm 
Offline

Joined: Fri Mar 24, 2006 2:50 pm
Posts: 24
Location: Germany
Hello lubost,

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!


Top
 Profile  
 
 Post subject: Solved
PostPosted: Fri Feb 09, 2007 11:08 am 
Offline

Joined: Fri Mar 24, 2006 2:50 pm
Posts: 24
Location: Germany
Hello,

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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: