Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Transactions

Status
Not open for further replies.

ralphiooo

Programmer
Oct 23, 2005
64
0
0
GB
Hi, i've been reading up on transactions and how to use them. From what i see i simply put BEGIN at the start and then COMMIT at the end.

The reason i'm using transactions is because i don't want updates to take effect until every update has been made. Therefore i'm wondering whether the database changes are committed if the user closes their browser half way through execution.

From what i see calling the rollback method reverts it to its original state but if the user closes their browser i have no way of calling the rollback method. Appreciate your help on this thanks.
 
Hello,

I am getting going with transactions too at the moment. If you look at his part of the manual it explains it quite well.


Especially these lines in your case:

Note that if you manually type

start transaction;

normally nothing will be committed until you manually type

commit;

I would understand this to mean that if the user closed the browser, which killed the process running the sql, then unless it had got to the 'commit' statement then none of the other updates would be made.

Chris MacPherson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top