I have a typed dataset, and where I call TableAdapter.Update(DataRow)
, the SQL executed includes an update of the primary key column of the database.
Unfortunately, when this code runs on a replicated database, the PK column has the rowguid
property set, and I get the following error:
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...
How do I prevent the tableadapter from updating this column (the value is the same)?