Nested TransactionScopes

  • Thread starter Thread starter Steve B.
  • Start date Start date
S

Steve B.

Hi,

If I have something like this :

using(TransactionScope t1 = new TransactionScope())
{
using(TransactionScope t2 = new TransactionScope())
{
// Do something with SqlServer
t2.Complete();
}
// Do something else with SqlServer
throw new Exception(); // Just to make it fail
t1.Complete();
}

Will the sqlcommands executed within t2 commited ? Or will the two
transaction be dependents (t2.Complete() commits only when t1.Complete()) ?

And at last, is System.Transactions planned for Compact Framework apps ?

Thanks,
Steve
 
All parts of the transaction either commits or rolls back as a single
unit of work. I don't know the answer to your last question.

--Mary
 
Back
Top