Title: When to set iscobol.jdbc.autocommit=false when using ESQL

isCOBOL ESQL is built upon JDBC, and the JDBC specification says that connections should (by default) be in 'autocommit' mode.
That means that every time a modification is made (whether it be INSERT, UPDATE or DELETE), the database is commited automatically.
That scenario is often what is required in plain Java, or COBOL applications.

However, there are some cases where it makes more sense for autocommit mode to be off, such as inside transaction processing environments or programs generated by Pro*COBOL or the DB2 preprocessor which doesn't work in autocommit mode by default.
You also may want to manage the number of commits in a large sequence of INSERT statements by limiting commits to every 1000 or so operations to improve performance.

To turn off autocommit, set this property:

   iscobol.jdbc.autocommit=false
If this variable is set to false, you are responsible for handling the transaction manually, with the COMMIT or ROLLBACK statement.
Authored by: Veryant Support on Fri, Oct 15th, 2010 at 7:00 PM
This question has been viewed 6954 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=148

Powered by PHPKB Knowledge Base Software