You add a method that executes an INSERT command to write state information to a database.

You put the write code in a TransactionScope using block. You must ensure that if this method throws an exception within the context of an outer, ambient transaction, it does not affect the completion status of the ambient transaction. Your solution should use the fewest system resources.

What should you do?

 Posted by Rajkatie on 9/30/2012 | Category: ADO.NET Interview questions | Views: 1216 | Points: 40
Select from following answers:
  1. Set TransactionScopeOption to Suppress.
  2. Remove the TransactionScope using block.
  3. Open the connection immediately before calling the command and close the connection immediately.
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response