beginner: when to use System.Transactions?

R

RAM

Hello,
I am learning .NET 2.0 (ASP.NET, ADO.NET). I would like to ask experienced
programmers when to use System.Transactions. One programmer told me that he
never used System.Transactions, he only uses database transaction
(SqlTransaction) and recommended me this method but he did not explained
why. I have read a few pages about both transaction types in MSDN but I have
little experience I don't know what are practical usages of
System.Transaction in real-world .NET applications.
Please help.
Thanks a lot.
/RAM/
 
F

Frans Bouma [C# MVP]

RAM said:
Hello,
I am learning .NET 2.0 (ASP.NET, ADO.NET). I would like to ask
experienced programmers when to use System.Transactions. One
programmer told me that he never used System.Transactions, he only
uses database transaction (SqlTransaction) and recommended me this
method but he did not explained why. I have read a few pages about
both transaction types in MSDN but I have little experience I don't
know what are practical usages of System.Transaction in real-world
.NET applications. Please help.

ONLY if you're using SqlServer 2005 or Oracle 10gR2

On any other database, it's a waste of time, as you won't get the
benefit of System.Transactions: lightweight transactions which are
promoted from ADO.NET transactions to distributed transactions more
efficiently.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top