first_page

A Table of Resources about TransactionScope

“[The TransactionScope Object Makes ADO.NET Transactions Easy](http://www.codeguru.com/columns/vb/article.php/c11067/)” This article compares how transactions work in the .NET 1.1 timeframe to the .NET 2.0 `TransactionScope` pattern.

“TransactionScope implicitly enrolls the connection and SQL command into a transaction” as long as all objects concerned are wrapped within a using block.

“[Using TransactionScope with SQL Server 2000](http://www.lhotka.net/Article.aspx?id=39c79955-ddc9-42c7-a657-d5c2ed49975e)” The new .NET 2.0 technology does not make using SQL 2000 in a `TransactionScope` pattern as “easy” as SQL 2005.

“You will take a non-trivial performance hit, just like you would by using the EnterpriseServices transaction option on your DataPortal_XYZ methods.”

“[TransactionScope Class (System.Transactions)](http://msdn2.microsoft.com/en-us/library/system.transactions.transactionscope.aspx)” “It is recommended that you create implicit transactions using the TransactionScope class, so that the ambient transaction context is automatically managed for you.”

However this is not without costs (see below).

“[Transactions in ADO.NET typed datasets—TransactionScope or DbTransaction](http://www.developerfood.com/re-transactions-in-ado-net-typed-datasets-transactionscope-or-dbtransaction/microsoft-public-dotnet-framework-adonet/f3192c7b-c8c2-4316-8a32-aa76137ecf9c/article.aspx)” “System.Transactions is designed for distributed transactions, so if your transactions are all in one database or even on one server, then you don't need it.”
“[Fast transactions with System.Transactions and Microsoft SQL Server 2000](http://blogs.msdn.com/florinlazar/archive/2005/09/29/475546.aspx)” “…if you want to use System.Transactions with no perf hit, in a scenario where you only talk to a database server (Microsoft SQL Server 2000) and you might also involve volatile transacted resources, like a transacted hashtable. The solution is to use an ‘adapter’ that enlists with the System.Transactions transaction using [PSPE](http://blogs.msdn.com/florinlazar/archive/2005/05/17/418595.aspx)…and coordinates the connection to the SQL Server using a SQL ‘local transaction’.”

rasx()