這是我的代碼:爲什麼我在更新我的訪問數據庫時出現此錯誤?
oledbcm = new OleDbCommandBuilder(oleDbDataAdabter);
DataRow dataRow = myDataset.Tables["salam"].NewRow();
dataRow[1] = textBox2.Text;
dataRow[2] = textBox3.Text;
dataRow[3] = textBox4.Text;
dataRow[4] = textBox5.Text;
myDataset.Tables["salam"].Rows.Add(dataRow);
oleDbDataAdabter.Update(myDataset , "salam");
,當我運行它,它使這個錯誤:
InvalidOperationException異常是未處理的;
ConnectionString屬性尚未初始化。
這個錯誤發生在更新行中!?!?!? –
你可以發佈例外詳情嗎? –
您是否在您的'OleDbCommandBuilder'中指定了連接字符串? –