how to connect mysql database in

May 23, 2009 at 02:39:50
Specs: Windows XP
how to connect mysql database in

I am install mysql 5.0 then i install sqlyog.

After that i create the database sample in mysql with the help of sqlyog.

I want to connect the database in & display it on gridview.

I have following code
string sConString = "Driver={MySQL ODBC 5.0 Driver};" +
"Server=backupserver;" + "Database=sample;" + "user id=root;" +
OdbcConnection oConnection = new OdbcConnection(sConString);
string sSQL = "SELECT * FROM user";
OdbcDataAdapter oDataAdapter = new OdbcDataAdapter(sSQL, oConnection);
DataSet oDataSet = new DataSet();
GridView1.DataSource = oDataSet;


but it gives error:

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


What is this problem ?????
How i can i solve the problem ?????
How we set the connection string in mysql for use on aspx page????

Plz give me reply.
Thanks in advance.


See More: how to connect mysql database in

Report •

November 8, 2009 at 08:01:10
mr Girish,
you did not specified drivers and its name ,
i think you have used mysql server connected architecture
so create datasource name in control panel administrative tools create it by any name and select database what ur using

Report •
Related Solutions

Ask Question