Select from following answers:- Remove SET NOCOUNT ON from the stored procedure.

- Set the adapter's AcceptChangesDuringFill to True.
- Set the adapter's AcceptChangesDuringUpdate to True.
- All Above
f you are using SQL Server stored procedures to edit or delete data using a DataAdapter, make sure that you do not use SET NOCOUNT ON in the stored procedure definition. This causes the rows affected count returned to be zero, which the DataAdapter interprets as a concurrency conflict. In this event, a DBConcurrencyException is thrown. Remove this line to fix the problem.
Setting BatchUpdateSize to 1 (the default) causes one update to occur at a time. This does not solve the problem.
Setting AcceptChangesDuringFill to True causes the AcceptChanges to be called on a DataRow after it is added to the DataTable during any of the Fill operations. This does not solve the problem.
Show Correct Answer
Source: Measureup.com | |
Alert Moderator