[求助]书上的代码也会有错?数据库问题!
private void Form1_Load(object sender, System.EventArgs e)
{
OleDbConnection conn=new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Data.mdb");
conn.Open();
OleDbDataAdapter myAdapter=new OleDbDataAdapter("SELECT * FROM Person",conn);
OleDbCommandBuilder builder= new OleDbCommandBuilder(myAdapter);
DataSet dsPerson=new DataSet();
myAdapter.Fill(dsPerson,"Person");
editName.DataBindings.Add("text",dsPerson,"Person.姓名");
}
最后在OleDbDataAdapter myAdapter=new OleDbDataAdapter("SELECT * FROM Person",conn);一句提示
未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 system.data.dll 中。
怎么回事哦??我是新手!!