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

Posted on 2004-10-25
Last Modified: 2013-12-03
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
Question by:str_kani
    LVL 8

    Accepted Solution

    Try this:

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

    Author Comment

    Thanks mate. It's ok now. Could you please tell me what was wrong there?

    Thanks a lot
    LVL 8

    Expert Comment

    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 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'.


    Expert Comment

    This is years later but this solved my problem. Fantastic!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    884 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

    14 Experts available now in Live!

    Get 1:1 Help Now