You use a SqlCommand instance named command to execute the following query:

AsyncCallback callback = new AsyncCallback(HandleCallback);
command.BeginExecuteNonQuery(callback, command);

private void HandleCallback(IAsyncResult result)

You must detect whether the query causes a database error.

What should you do?

 Posted by Rajkatie on 10/26/2012 | Category: ADO.NET Interview questions | Views: 3055 | Points: 40
Select from following answers:
  1. Add a call to EndExecuteNonQuery to the callback. Bracket this call in a try-catch block.
  2. Check the return value of the EndExecuteNonQuery call.
  3. Check the return value of the BeginExecuteNonQuery call.
  4. All Above

Show Correct Answer

Source: | | Alert Moderator 

Comments or Responses

Login to post response