This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Auto commit??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Auto commit???" Watch "Auto commit???" New topic
Author

Auto commit???

Jon Tsatsonis
Greenhorn

Joined: May 10, 2000
Posts: 4
Hi,
Can anyone answer my question?
If I set a connections autocommit mode to false, execute a couple of SQL statements and then commit. Will the connection still have autocommit mode set to false? Or does calling the explicit .commit method automatically set autocommit to true again?
Thanks for any help.
Jon.
Tom P
Ranch Hand

Joined: May 06, 2000
Posts: 88
The connection will still be set to auto commit being false. You can test this yourself by running the getAutoCommit() method.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Auto commit???