Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JDBC connection.setAutoCommit(false) commits after each update????

414599Feb 10 2004 — edited May 22 2005
The problem is on AUTO COMMIT of JDBC connection.

What I did was:

....

conn.setAutoCommit(false);

conn.executeUpdate( mySQLStatement );

....

conn.rollback();

....

The expected result to the database table
should be: NOTHING UPDATED.

But what actually happened was: the updates
went into the database.

So the setAutoCommit(false) didn't work
as expected.

BTW, I am using Oracle 8.1.7 and the Oracle
thin JDBC driver.

Any help or hint will be appreciated.

Thanks.

Chenglin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2005
Added on Feb 10 2004
8 comments
1,752 views