locked
Probelm with mysql odbc connection string RRS feed

  • Question

  • User637234440 posted

    I am using following connection string for MySql version 5.1 and visual studio2008

    string strCon = "DRIVER={MySQL ODBC 3.51 Driver};Server=myserver; PORT=3306; DATABASE=mydb; USER=roor; PASSWORD=bye; OPTION=0;";

    OdbcConnection OCon = new OdbcConnection(strCon);

    but when i going to fiill dataset then following error comes

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

    Wednesday, June 1, 2011 2:38 AM

Answers

  • User1805528910 posted

    Hello

    Donwload latest odbc driver from mysql mention bellow link

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

    Installed it in your system and after that create dsn (DataSourceName) to get working.

    Check following link how to create DSN

    http://www.devasp.com/samples/dsn_sql.asp

    http://www.geeksengine.com/article/mysql-odbc.html

    Here is the connection string using DSN

    http://www.velocityreviews.com/forums/t365306-dsn-connectionstring.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 1, 2011 5:27 AM

All replies

  • User1446927574 posted

    Make sure that MySql ODBC driver is installed on computer.

    You can download that from following link.

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

    Let me know if that works.

    Wednesday, June 1, 2011 3:11 AM
  • User-693248168 posted

    ARe you sure yo have the correct connectionstring.

    Checkout all connection strings.

    www.ConnectionStrings.com

    Wednesday, June 1, 2011 3:12 AM
  • User1805528910 posted

    Hello

    Donwload latest odbc driver from mysql mention bellow link

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

    Installed it in your system and after that create dsn (DataSourceName) to get working.

    Check following link how to create DSN

    http://www.devasp.com/samples/dsn_sql.asp

    http://www.geeksengine.com/article/mysql-odbc.html

    Here is the connection string using DSN

    http://www.velocityreviews.com/forums/t365306-dsn-connectionstring.html

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 1, 2011 5:27 AM