0

I am keeping my two methods in a single transaction. Both the methods are working on same tables.

When I keep both in a single transaction, the second one when go to operate on the same tables, it doesn't execute.

I tried to keep both the methods in different transaction , after committing the first one I begin the second one but the same problem occurs.

Then I tried making different objects of session and still the result is same.

I want to keep these methods in transactions . kindly suggest me the suitable way to handle this. I don't want to make any changes in the stored procedure , I want to handle it on C# code level in my windows application.

Regards, Nitish

1 Answers1

0

Create a Threaded environment. Say Thread 1 is T1 (First Method), Thread 2 is T2(Second Method). Start T1 and T2. But in the T2, Wait for T1 to complete that Pause the T2 and Resume when T1 is completed.

[You can do this easily by using the Transactions at server itself :) ]

Sivaraman
  • 438
  • 2
  • 9