Hi all,
I've got a basic webform with a datagrid control on it. the column collection is setup with 6 columns contained in the course table however the following code does not populate any data into the control.
string SelectCmdString = "SELECT * FROM Course";
string conString = System.Configuration.ConfigurationSettings.AppSettings["SQLConnectionString"];
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter(SelectCmdString, conString);
DataSet myDataSet = new DataSet();
mySqlDataAdapter.Fill(myDataSet,"Listing");
DataGrid1.DataSource = myDataSet.Tables["Listing"];
DataGrid1.DataBind();
Its odd to me as from hunting around on tut net i can't see anything that i have missed out.
cheers all.
I've got a basic webform with a datagrid control on it. the column collection is setup with 6 columns contained in the course table however the following code does not populate any data into the control.
string SelectCmdString = "SELECT * FROM Course";
string conString = System.Configuration.ConfigurationSettings.AppSettings["SQLConnectionString"];
SqlDataAdapter mySqlDataAdapter = new SqlDataAdapter(SelectCmdString, conString);
DataSet myDataSet = new DataSet();
mySqlDataAdapter.Fill(myDataSet,"Listing");
DataGrid1.DataSource = myDataSet.Tables["Listing"];
DataGrid1.DataBind();
Its odd to me as from hunting around on tut net i can't see anything that i have missed out.
cheers all.