You use DataAdapter to load a DataTable from a Microsoft SQL Server database table. Your code makes several changes to the DataTable and then calls Update to update the database. The UpdateCommand calls the following stored procedure:

CREATE PROCEDURE dbo.UpdateAnnotation
(
@strAnnotation VARCHAR(200),
@dtDate DATETIME
)
AS
SET NOCOUNT ON
...
GO

Calling the Update method throws a DBConcurrencyException.

What should you do?

 Posted by Rajkatie on 10/30/2012 | Category: ADO.NET Interview questions | Views: 2018 | Points: 40
Select from following answers:
  1. Remove SET NOCOUNT ON from the stored procedure.
  2. Set the adapter's AcceptChangesDuringFill to True.
  3. Set the adapter's AcceptChangesDuringUpdate to True.
  4. All Above

Show Correct Answer


Source: Measureup.com | | Alert Moderator 

Comments or Responses

Login to post response