>
>I've discussed this problem with David Browne from MS by email and the problem seems to be in the fact that we're opening the connection prior to instantiating this TransactionScope object and so the existed connections will not enlist in the transactions.
>>
>>I'm going to verify if .NET documentation explicitly states this fact but now what should I do?
>>
>>Thanks.>
>That makes sense that it would work this way, I guess. You shouldn't leave connections open for any longer than necessary (but you probably already know that), so the question is *why* is your connection already open? And obviously, that part of your code (opening the connection) needs to also be within a TransactionScope.
David suggested this code
sqlConnection.EnlistTransaction(Transaction.Current);
which worked after I introduced a new property and disabled check for uncommitted transactions (when this new property is set to true) and explicit committing of them which we were doing in each SQL call.
If it's not broken, fix it until it is.
My Blog