gridview绑定数据时出错了,什么情况?
OleDbConnectionmycon=newOleDbConnection();mycon.ConnectionString="Provider=Microsoft....
OleDbConnection mycon = new OleDbConnection();
mycon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\2013workplace\\Correspondence.mdb";
//mycon.Open();
OleDbDataAdapter myda = new OleDbDataAdapter("select * from [TableGroup]",mycon);
DataSet myds = new DataSet();
myda.Fill(myds, "TableGroup");//这里提示堆栈溢出,无法计算表达式的值。
gridview1.DataSource = myds;
gridview1.DataKeyNames = new string[] { "GID" };//主键
gridview1.DataBind(); 展开
mycon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\2013workplace\\Correspondence.mdb";
//mycon.Open();
OleDbDataAdapter myda = new OleDbDataAdapter("select * from [TableGroup]",mycon);
DataSet myds = new DataSet();
myda.Fill(myds, "TableGroup");//这里提示堆栈溢出,无法计算表达式的值。
gridview1.DataSource = myds;
gridview1.DataKeyNames = new string[] { "GID" };//主键
gridview1.DataBind(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询