U
UncleJoe
Hi all,
I would appreciate some pointers on how to implement nested
transactions in ADO.NET. Take the following code as an example:
SqlConnection conn = new SqlConnection(connStr);
conn.Open();
SqlTransaction tran =
conn.BeginTransaction(IsolationLevel.ReadUncommitted , "OuterTran");
process1();
process2();
process3();
tran.Rollback("OuterTran");
Process1, Process2 and Process3 are originally three separate processes
not meant to work together so they each open its own connection and
transaction. As you can see I am trying to wrap them together in a
nested transaction so that the outer shell can have a final say. Is
that do-able? My testing result indicates that the outer transaction
was ignored completely. Any insight will be greatly appreciated.
I would appreciate some pointers on how to implement nested
transactions in ADO.NET. Take the following code as an example:
SqlConnection conn = new SqlConnection(connStr);
conn.Open();
SqlTransaction tran =
conn.BeginTransaction(IsolationLevel.ReadUncommitted , "OuterTran");
process1();
process2();
process3();
tran.Rollback("OuterTran");
Process1, Process2 and Process3 are originally three separate processes
not meant to work together so they each open its own connection and
transaction. As you can see I am trying to wrap them together in a
nested transaction so that the outer shell can have a final say. Is
that do-able? My testing result indicates that the outer transaction
was ignored completely. Any insight will be greatly appreciated.