Link to home
Start Free TrialLog in
Avatar of byte1
byte1Flag for United States of America

asked on

MySQL and ASP.net 1.1

I am getting this error while trying to connect to a MySQL server.

Connection String :
Driver={MySQL ODBC 5.1 Driver};Server=11.111.111.111;database=store;Uid=root;Pwd=root;Option=3;

Error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

How do i check which version of the driver is installed ? Should this be on the DB server or ASp.net webserver ?

Avatar of ajitha75
ajitha75
Flag of India image

Are you using MySQL Connector Net.

You can use the below connection string in that case

"datasource=11.111.111.111;username=root;password=root;database=store"

Thanks
Ajitha
Avatar of byte1

ASKER

/i thought the mysql connector Net was only on 2.0 framework. I was not able to add those reference DLL's in VS2003
To see versions of your ODBC drivers, click Start in Windows Vista, then in the search box type ODBC and hit enter. A dialog will open; now you can access the Drivers tab. In XP you can go to Control Panel|Administrative Tools|Data Sources.

Regards,
Jon500

By the way, drivers need to be on the machine FROM WHICH you are making a connection to the database. In your case, this is the web server.

Regards,
Jon500
You will need to download and install it:

http://dev.mysql.com/downloads/connector/net/

it does not come with .Net 2.0 framework.. only the MSSQL connection is part of the framework....
Avatar of byte1

ASKER

under ODBC Data Sources, I see a Drivers Tab, which has only a single entry "Microsoft ODBC for Oracle" and the About Tab has version 3.526.3959.0
You will need to download the MySQL driver to be able to use the ODBC connection...  As mentioned above this will need to be installed on every system running the application and accessing the MySQL database via this code....  This is normal, a lot of people are using this connector....
have you downloaded Connector-ODBC 5.1.6 yet? If you have, you should see the MySQL ODBC 3.51 Driver in the drivers list.

http://dev.mysql.com/downloads/connector/odbc/

Thanks
Ajitha
Avatar of byte1

ASKER

I did install the mySQL driver on the server, now it says version 5.01.06.00

My connection string has:

{MySQL ODBC 5.01 Driver}

I still get the same error.
ASKER CERTIFIED SOLUTION
Avatar of ICaldwell
ICaldwell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial