Friday, August 11, 2006 12:14 AM
We were excited by the potential of TransactionScope to simplify our data access code, eliminating the need to pass around a database transaction.
After playing around with .NET 2.0 for a while we were very disappointed to find that unless you used the exact same connection object and kept it open for the duration of the transaction it would result in escalation to the DTC, even though all connections were to the same resource and using the same connection string.
This leaves passing a connection around or creating a DbConnectionScope (mentioned in one of the forum post below) as the only option to avoid escalation. This is a little less than an ideal situation.
This problem has been discussed pretty extensively in the two threads below.
My question is; is this fix / modification going to be in the Orcas .NET release or will it be after that?
This problem is a major road block to using TransactionScope in a real project. I would love to hear other peoples thoughts. Is this an issue for you too?
Vote on this issue here.
Friday, August 18, 2006 6:13 PM
This is actually a restriction within the implementation of SQLServer, rather than anything inherent in System.Transactions.
I'll find out when they are scheduled to address this and post back here.
PM for XES Transactions
Friday, August 18, 2006 7:25 PM
As Jack said above, this is not something that we can fix on the client-side only; we need to change both the client and the server (and the client-server protocol actually) to make this work.
We've had some discussions about this and have a design for the solution, but it's not yet clear whether/when we'll fix this. If we do fix it, it would enable the usual pattern where each component does open/close over a connection, and effectively there is never more than one connection opened at the same time.
ADO.NET Technical Lead
Wednesday, August 30, 2006 4:56 AMThanks for your comments.
That explains the problem a bit more. It obviously isn't the simple solution that I thought.
It would be great if you guys could have a fix in Orcas! :-)
Sunday, March 11, 2007 11:14 PMHi
Is it possible yet, for someone to give us an update on whether this issue will be addressed in the Orcas .NET release?
Saturday, March 17, 2007 1:30 AM
While I'm not the authority to speak for System.Data, the latest I know is that this issue will not be addressed in Orcas release.
You might find the DBConnectionScope class useful to workaround this limitation: