J
Jeff
OS : winXP pro (sp2)
IDE: VS .NET 2003
This is my code for adding data to my datagrid (DataGrid1)
MySqlConnection conn = new
MySqlConnection(ConfigurationSettings.AppSettings["DB_Connection_string"]);
conn.Open();
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand("select * from Member", conn);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "member");
DataGrid1.DataSource = dataset;
DataGrid1.DataMember = "member";
When I run this code the datagrid becomes invisible... I'm not sure why I
don't see the datagrid, datagrid's visible property is set to true....... So
I don't think the problem is there.... I've also tested this script:
adapter.Fill(dataset, "member");
and it returns one row, which is correct, because the table member have only
one record...
I'm wondering maybe the problem is related to me using * in the select
statement...
Please, give me some tips about what I should do to fix this problem!!!
Jeff
IDE: VS .NET 2003
This is my code for adding data to my datagrid (DataGrid1)
MySqlConnection conn = new
MySqlConnection(ConfigurationSettings.AppSettings["DB_Connection_string"]);
conn.Open();
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand("select * from Member", conn);
DataSet dataset = new DataSet();
adapter.Fill(dataset, "member");
DataGrid1.DataSource = dataset;
DataGrid1.DataMember = "member";
When I run this code the datagrid becomes invisible... I'm not sure why I
don't see the datagrid, datagrid's visible property is set to true....... So
I don't think the problem is there.... I've also tested this script:
adapter.Fill(dataset, "member");
and it returns one row, which is correct, because the table member have only
one record...
I'm wondering maybe the problem is related to me using * in the select
statement...
Please, give me some tips about what I should do to fix this problem!!!
Jeff