1
string s = "Select number,name from table where id = 5 and num = 20";
SqlDataAdapter adapter = new SqlDataAdapter(s, con);
adapter.Fill(dset, "ABC");
SqlCommandBuilder sT = new SqlCommandBuilder(adapter);
adapter.Update(ds,"ABC");
下面的代碼拋出一個異常,稱該表ABC
無法找到如何使用數據集中的值更新數據庫?
良好的格式是你的朋友。用它。 – 2014-10-09 11:44:02
您的更新使用了選擇不同的數據集... – Paddy 2014-10-09 11:47:14
@ Paddy Hah,這是一個很好的結果。 – 2014-10-09 11:59:43