Re: Transaction.Commit() and Transaction.Rollback()
- From: "Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx>
- Date: Sat, 3 Nov 2007 09:01:18 +0100
"weird0" <amirediwan@xxxxxxxxx> wrote in message news:1194071644.179259.127160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Transaction.Commit() , Transaction.Rollback() ,
cmd.BeginTransaction(), cmd.EndTransaction()
Can any one explain what are the kind of scenarios that these set of
commands are being used. MSDN does have the code but does not explain
how are they different from simple ExecuteReader() or executing any
simple query.
They are "different" in the sense that the transaction methods "surround" your simple querys, to group them inside a transaction. The net efect is that all the queries inside are completed as a whole (if you call transaction.Commit() and there is no error) or all of them are cancelld (transaction.RollBack). At the same time, the server places locks on the records that the transaction touches, so that other processes cannot touch them and your work is Isolated until the transaction is completed.
http://en.wikipedia.org/wiki/ACID
http://msdn2.microsoft.com/en-us/library/2k2hy99x.aspx
.
- References:
- Transaction.Commit() and Transaction.Rollback()
- From: weird0
- Transaction.Commit() and Transaction.Rollback()
- Prev by Date: Re: Petzold Assumed I Could Figure It Out -- I Am Stumped
- Next by Date: Re: Transaction.Commit() and Transaction.Rollback()
- Previous by thread: Transaction.Commit() and Transaction.Rollback()
- Next by thread: Re: Transaction.Commit() and Transaction.Rollback()
- Index(es):
Relevant Pages
|