Solved

MySQL and ADO

Posted on 2004-09-20
6
355 Views
Last Modified: 2013-11-23
Hi.

I'm writing an application to allow migration of databases from one type to another.  The application will handle Access, SQL Server and MySQL database once it's done.

At the moment, I'm very happy with handling Access and SQL Server stuff, but I can't even create a connection to the MySQL server.

Can someone please advise me as to why I can't simply populate a connection string and set connected:=true to open a database connection to a MySQL server?

I'm using TADOConnection and TADOQuery to connect & read/write the databases.  I don't understand why this should be a problem as I have used loads of database types whilst programming before and have never come across this problem.

Thanks in advance,

John.
0
Comment
Question by:Jaymol
6 Comments
 
LVL 17

Expert Comment

by:Wim ten Brink
Comment Utility
AFAIK, there's no ADO provider for MySQL. There's one for MS-SQL, though. Spelled almost similar. To connect to MySQL you'll need an ODBC driver for it and connect through ADO to ODBC to MySQL.
0
 
LVL 6

Author Comment

by:Jaymol
Comment Utility
Could you explain a little more, maybe with a code example please.

I'm currently using this connection string....

"Driver={MySQL ODBC 3.51 Driver};Port=3306;Option=3;Server=Development;Database=TestDB;USER=root;PASSWORD=;"

Thanks.
0
 
LVL 6

Author Comment

by:Jaymol
Comment Utility
Actually, don't bother - I've just reread what you've said and that's basically what I'm already doing.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Expert Comment

by:gwalkeriq
Comment Utility
Actually, there are some ADO drivers for MySQL. Never tried any of them myself - thought I would, so I had done a little research.  ADO.Net for MySql on Sourceforge.net and ByteFX.data on ByteFX.com also SevenObjects on SevenObjects.com



0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 250 total points
Comment Utility
0
 
LVL 22

Expert Comment

by:mnasman
Comment Utility
Jaymol

  Did you Install MySql ODBC drivers in the computer that you testing from?
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now