datagrid 中数据邦定不了
我的代码:
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + System.Web.HttpContext.Current.Server.MapPath( "dd.mdb ");
string field1 = "Select * From stu ";
System.Data.OleDb.OleDbConnection conn1=new System.Data.OleDb.OleDbConnection();
conn1.ConnectionString =connectionString;
OleDbDataAdapter da=new OleDbDataAdapter(field1,conn1);
conn1.Open();
DataSet ds=new DataSet();
da.Fill(ds, "tabel1 ");
conn1.Close();
DataGrid1.DataSource=ds.Tables[ "tabel1 "].DefaultView;
DataGrid1.DataBind();
这样一直出错,也不知道问题是什么,
------解决方案--------------------把出错信息贴上来看看