Error message when you update a database by using a stored procedure: “System.Data.DBConcurrencyException”
Apr.25, 2010 in
Uncategorized
Symptoms
When you use a DataAdapter object to write changes back to a database by means of a stored procedure, you may receive the following error message:
An unhandled exception of type ‘System.Data.DBConcurrencyException’ occurred in system.data.dll
Additional information: Concurrency violation: the UpdateCommand affected 0 records. If the data is not updated correctly, you should receive a DataConcurrencyException exception instead of the above-mentioned error message.
Resolution
This problem can occur if the stored procedure runs the SET NOCOUNT ON statement.

Leave a Reply