You are debugging an issue with the following code:

using (TransactionScope scope = new TransactionScope())
using (SqlConnection connection1 = new SqlConnection(connectString1))
SqlCommand command1 = new SqlCommand(updateCommandText, connection1);
using (SqlConnection connection2 = new SqlConnection(connectString2))
SqlCommand command2 = new SqlCommand(insertCommandText, connection2);

You find that under extremely heavy application load, the code intermittently throws a TransactionAbortedException when leaving the outermost using block. Closer investigation shows that ExecuteNonQuery calls do succeed. You must fix the problem.

What should you do?

 Posted by Rajkatie on 9/30/2012 | Category: ADO.NET Interview questions | Views: 1193 | Points: 40
Select from following answers:
  1. Increase connection timeouts.
  2. Increase command timeouts.
  3. Increase transaction timeout.
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response