[JDBC] autocommit -- rollback on statement close

Jonathan Carlson jcarlson at is.com
Wed Jul 19 15:46:20 EDT 2000


I searched the archive for autocommit and didn't see anything similar to 
this.  I am using the latest build of the JDBC driver.

In my application I turn off autocommit so that I can group updates into a 
single transaction.  However, It appears that with this option, when 
closing a statement, the transaction is automatically rolled back.  The 
Weblogic SQLServer JDBC driver that I have used doesn't do this.

rollback/commit is defined in the JDBC API as a connection behavior instead 
of a statement behavior.  Is it appropriate to rollback on a statement 
close?

I've changed my application code so I reuse statements instead of closing 
them, but I'm still curious about this.


Jonathan Carlson
Software Developer
Minneapolis, Minnesota



More information about the FreeTDS mailing list