alanchinese
Regular
- Joined
- Jan 12, 2005
- Messages
- 62
Hi,
In the "Remarks" section of System.Transactions.CommitableTransaction.Commit() method, it says
Can anyone post some sample codes on how an object is registered to a transaction, and how this object itself get unregistered?
I am catching one of the ExecuteNonQuery failures and want to retry again. The current transaction's TransactionInformation.Status is "Active" until after the Commit() method call. I think it detects there was at least one failure but I don't know how to clean it up before the Commit() call.
Thanks a lot,
Alan.
In the "Remarks" section of System.Transactions.CommitableTransaction.Commit() method, it says
When this method is called, all objects that have registered to participate in the transaction are polled and can independently indicate their vote to either commit or roll back the transaction. If any participant votes to roll back the transaction, it is rolled back and this method throws a TransactionException exception.
Can anyone post some sample codes on how an object is registered to a transaction, and how this object itself get unregistered?
I am catching one of the ExecuteNonQuery failures and want to retry again. The current transaction's TransactionInformation.Status is "Active" until after the Commit() method call. I think it detects there was at least one failure but I don't know how to clean it up before the Commit() call.
Thanks a lot,
Alan.