none
ADO.NET 2.0 and System.Transaction Namespace RRS feed

  • Question

  •  

    Can any body tell me the below explanation for using System.Transaction (.NET 2.0) is correct ??

     

    """We are not using or planning to use transactions outside ADO.net’;s simple open and close connection/transaction, which is sematically equivalent to the transaction namespace . We don’t do even that properly since so many of our transactions span modules, but not databases. We are not going to incur additional runtime costs outside what ADO.net since this is infrastructure we do not need.

    Our transaction attribute from a DTC perspective is “Always its own transaction”.

     

    This only makes sense if you are using 2 or 3 databases AND making updates to all these database atomically, which we currently don’t. It also incurs the heavy overhead of COM+  (aka MTS in the C++ world before 2002) interaction. This is something that Microsoft has been doing since times immemorial to try to penetrate the enterprise computing environment which could have multiple SQL databases, multiple Oracle databases, multiple DB2 databases etc."""

     

     

    Thursday, January 17, 2008 6:05 AM

Answers

  • I cannot answer about your post because you did not add your database server and version because in SQL Server 2000 to use System.Transaction you must use MSDTC but in SQL Server 2005 it is not required by default.  You also need to know System.Transaction is application layer and none atomic so for best practice you should pass that transaction to either ADO.NET transaction or T-SQL transaction because both are atomic.  This is very important because in RDBMS transaction is a unit of work, nesting is allowed but most none atomic operations can generate errors.  These System.Transaction operations are derived from the previous COM version but these are more flexible which also lead to problems for developer.

     

    Thursday, January 17, 2008 4:24 PM