积极答复者
dataTable GetChange()

问题
答案
-
GetChanges()而不是GetChange().
如果无法解决你的问题,请列出详细代码,谢谢。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download- 已标记为答案 Barry WangModerator 2014年8月18日 2:38
-
确实代码是最好的让别人知道你问题的办法,另外你看一下这里:
http://msdn.microsoft.com/en-us/library/k2552649(v=vs.110).aspx
private void UpdateDataTable(DataTable table, OleDbDataAdapter myDataAdapter) { DataTable xDataTable = table.GetChanges(); // Check the DataTable for errors. if (xDataTable.HasErrors) { // Insert code to resolve errors. } // After fixing errors, update the database with the DataAdapter myDataAdapter.Update(xDataTable); }
你的代码里有做错误或者异常处理么?另外这是一个网站程序吧?
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 Barry WangModerator 2014年8月18日 2:38
全部回复
-
GetChanges()而不是GetChange().
如果无法解决你的问题,请列出详细代码,谢谢。
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download- 已标记为答案 Barry WangModerator 2014年8月18日 2:38
-
确实代码是最好的让别人知道你问题的办法,另外你看一下这里:
http://msdn.microsoft.com/en-us/library/k2552649(v=vs.110).aspx
private void UpdateDataTable(DataTable table, OleDbDataAdapter myDataAdapter) { DataTable xDataTable = table.GetChanges(); // Check the DataTable for errors. if (xDataTable.HasErrors) { // Insert code to resolve errors. } // After fixing errors, update the database with the DataAdapter myDataAdapter.Update(xDataTable); }
你的代码里有做错误或者异常处理么?另外这是一个网站程序吧?
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 Barry WangModerator 2014年8月18日 2:38