private void rdoCategory_CheckedChanged(object sender, EventArgs e)
{
string sql = "SELECT * FROM Recipe ORDER BY CategoryDesc";
dbCommand = new OleDbCommand(sql,dbConnection);
dbAdapter.SelectCommand = dbCommand;
dbAdapter.Fill(ds, "Recipe");
dgvRecipes.DataSource = ds.Tables["Recipe"];
}
Asked
Active
Viewed 80 times
0

halfer
- 19,824
- 17
- 99
- 186
-
I am trying to fetch data from access to print on a data grid view, but it keeps on giving me that error, I have the exact same code of Form_load and it works perfectly fine, the difference is only "ORDER BY".. – user2645429 Aug 02 '13 at 09:59
-
1can u provide a brief description of the problem.. – Unni Kris Aug 02 '13 at 10:01
-
1Post your stacktrace, where is the exception thrown? – Daniel B Aug 02 '13 at 10:01
-
There is no background information here, nor language tag, so voting to close. – halfer May 16 '16 at 21:38