wood burning stoves*
The moose likes JDBC and the fly likes .commit() and .rollback() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark ".commit() and .rollback()" Watch ".commit() and .rollback()" New topic

.commit() and .rollback()

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
I understood that you use these to methods in a finally block,

but i thought that a finally block came after the try-catch statement.

and what is it that these two methods, commit() and rollback() do?



You down with OOP? Yeah you know me!
marc weber

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Justin Fox:
...and what is it that these two methods, commit() and rollback() do? ...

See java.sql.Connection.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60765

Moved to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
subject: .commit() and .rollback()
Similar Threads
Transaction context propogation
AutoCommit(False) and rollback bst practise
JDBC-Auto commit
transaction rollback during multiple session
Auto Commit option fails to work