Re: Transaction.Commit() and Transaction.Rollback()

Tech-Archive recommends: Fix windows errors by optimizing your registry



"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

.



Relevant Pages

  • RE: Combo box bound field change
    ... Modify the row source to include both fields. ... Make the bound column the company name column. ... now you can change the company name any time and your query ... Make a copy of your transaction table, but copy only the structure, not the ...
    (microsoft.public.access.forms)
  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)
  • RE: Combo box bound field change
    ... You do want the companynbr field rather than the company ... now you can change the company name any time and your query ... Make a copy of your transaction table, but copy only the structure, not the ... I'd run a report to show what all that company purchased. ...
    (microsoft.public.access.forms)
  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... is possible for others to add other new orders to the database which I will ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)
  • RE: Combo box bound field change
    ... now you can change the company name any time and your query ... Make a copy of your transaction table, but copy only the structure, not the ... Modify the New transaction table and change the company name field to ... I'd run a report to show what all that company purchased. ...
    (microsoft.public.access.forms)