我有一个类型化数据集,并且其中我打电话TableAdapter.Update(DataRow)
,执行的SQL包括数据库的主键列的更新。防止类型化数据集更新PK柱
不幸的是,当这个代码复制的数据库上运行时,PK列具有rowguid
属性集,我也得到了以下错误:
System.Data.SqlClient.SqlException: Updating columns with the rowguidcol property is not allowed. The transaction ended in the trigger. The batch has been aborted. at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataA...
如何防止TableAdapter的自更新此列(价值是一样的)?
在您的类型化的DataSet是竟标作为主键 – Gratzy 2009-09-09 16:26:17