Click here to Skip to main content
15,922,696 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
string query = "SELECT * FROM jobs";
string connection =  "Provider=MySQLProv;DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;USER=wey;PASSWORD=wey;OPTION=3;";
OleDbConnection conn = new OleDbConnection(connection);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.SelectCommand = new OleDbCommand(query, conn);
DataSet dset = new DataSet();
adapter.Fill(dset, "jobs");


I get the "MySQLProv not registered" - it fails when the filling the dataset.
thanks in advance.
Posted
Updated 26-May-11 19:45pm
v3

For a moment, please comment the following line see what happen.

jobsGrid.DataSource = dset.Tables["jobs"].DefaultView ;


You may comes with so many error on rest of the code, if so comment the rest and isolate the code up to the adapter fill. Your grid can hold the dataset directly, that's what I wonder.
 
Share this answer
 
v2
Comments
vrushali katkade 27-May-11 1:24am    
i will be check without this line but i will be get this exception at the fill line not this line
CodingLover 27-May-11 4:20am    
so what happen?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900