I think is correct.
I have been working with Powerbuilder and I find this trouble very often with the programmers.
When You use AutoCommit True, then Powerbuilder don't start any transactions, and in that way every insert, delete or update are make automatic and you will not need execute any commit statement
But if you set AutoCommit False, then Powerbuilder send a Commit statement to the server, then every insert, delete or update will be into a transaction and you will need execute a commit or rollback to end.
May be this help you with jconnect.
Re: transaction not started unless setAutoCommit(false)
I'am not a jConnect expert but I guess this is due to the default ASE 's behavior.
ASE uses by default the non chained mode, in another words it does not open a explicit transaction and thus it performs commit automoticly.
In this case you must open transactions explitcly (begin transaction)
When set chained = on ASE open implicity a transaction, but does not commit implicity, thus you must commit or rollback explictly.
I suspect that setAutoCommit property modifies the chained setting of ASE.
Originally posted by johnlon
Note : Tested using all late versions of Sybase JConnect.
re : java.sql.Statement.executeUpdate(String)
I was under the impression that whenever executeUpdate() was called a transaction would be started so that the sql in the executeUpdate would execute within the context of a transaction.
I have found that this is not the case.
JConnect only starts a transaction if setAutoCommit(false) is in effect.
This doesn't seem right to me because the sql string in executeUpdate() could contain a number of insert/update/delete operations that should be atomic.
Does this behaviour seem correct or is JConnect broken ??