Skip to content Skip to sidebar Skip to footer

How To Handle TransactionInDoubtException

i have some simple SELECT statements and an INSERT wrapped in a using(TransactionScope...) block. UPDATE: isolation level is ReadCommited i got the following exception on calling s

Solution 1:

A transaction is in doubt when it's unknown whether it has been completed or aborted. The database is still in a consistent state. If you ever get such an exception, you need to access the database to figure out whether the changes has taken place or not, but you can be sure you won't see half of the changes.

Note, I don't know what happens if the component in doubt is the DTC, and you have a distributed transaction - I sure hope Microsoft took care of that, and that a doubtful distributed transaction is still treated as a whole.

See here: "Specifically, the final outcome of the transaction, whether it commits or aborts, is never known for this transaction."


Post a Comment for "How To Handle TransactionInDoubtException"