ASA Programming Guide
Using SQL in Applications
Controlling transactions in applications
Setting autocommit or manual commit mode
The way to control the commit behavior of your application depends on the programming interface you are using. The implementation of autocommit may be client-side or server-side, depending on the interface.
For more information, see Autocommit implementation details.
To control autocommit mode (ODBC)
By default, ODBC operates in autocommit mode. The way you turn off autocommit depends on whether you are using ODBC directly, or using an application development tool. If you are programming directly to the ODBC interface, set the SQL_ATTR_AUTOCOMMIT connection attribute.
To control autocommit mode (ADO.NET)
By default, the ADO.NET provider operates in autocommit mode. To use explicit transactions, use the AsaConnection.BeginTransaction method.
For more information, see Transaction processing.
To control autocommit mode (JDBC)
By default, JDBC operates in autocommit mode. To turn off autocommit, use the setAutoCommit method of the connection object:
conn.setAutoCommit( false );
To control autocommit mode (Open Client)
By default, a connection made through Open Client operates in autocommit mode. You can change this behavior by setting the CHAINED database option to ON in your application using a statement such as the following:
SET OPTION CHAINED='ON'
To control autocommit mode (embedded SQL)
By default, embedded SQL applications operate in manual commit mode. To turn on autocommit, set the CHAINED database option to OFF using a statement such as the following:
SET OPTION CHAINED='OFF'