It's not a secret anymore!
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Auto commit???" Watch "Auto commit???" New topic

Auto commit???

Jon Tsatsonis

Joined: May 10, 2000
Posts: 4
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.
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.
I agree. Here's the link:
subject: Auto commit???
It's not a secret anymore!