AP MySQL [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

hi, I am getting
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
 error, while tring to connect MySQL from asp.
This is the code I am using
Set oConn = Server.CreateObject("ADODB.Connection")
stroConn = "Driver={mySQL};Server=localhost;Port=3306;Option=131072;Stmt=;Database=mydb;Uid=root;Pwd="
oConn.Open stroConn
Thanks in advance
- Kani
LVL 12
str_kaniAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hendridmCommented:
Try this:

stroConn = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Database=mydb"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
str_kaniAuthor Commented:
Thanks mate. It's ok now. Could you please tell me what was wrong there?

Thanks a lot
0
hendridmCommented:
Sure thing, the "Driver=" setting must match an actually name of a driver on your system.  To see a list of drivers, go to 'Administrative Tools' then 'Data Sources (ODBC)' then 'Drivers' tab.  The latest MyODBC driver from mysql.com installs itself as "MySQL ODBC 3.51 Driver".  Simple putting "Driver={mysql}" did not work because you apparently don't have a driver installed named 'mysql'.

Cheers,
Daniel
0
helpdeskmckinstryCommented:
This is years later but this solved my problem. Fantastic!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.