SET AUTOCOMMIT

Function

The SET COMMIT statement is used to switch on/off AUTOCOMMIT.

Invocation

 

Embedded Mode  P

Dynamic Mode  

Interactive Mode  P

 

Syntax



set_autocommit.bmp


Description

With  Adabas SQL Gateway, a database transaction, which can consist of one more SQL statements for data manipulation, remains open until an SQL statement for schema definition and manipulation or a COMMIT statement is issued. If a ROLLBACK statement is executed or if the SQL connection is terminated and the transaction is not explicitly terminated, which implies an implicit ROLLBACK statement, all changes to the database which were performed during the transaction will not be applied to the database.

  • The SET AUTOCOMMIT ON statement can be used to cause Adabas SQL Gateway to issue an internal COMMIT after every SQL statement, thereby effectively closing the transaction after each SQL statement.

  • The statement SET AUTOCOMMIT OFF can be used to switch off AUTOCOMMIT. The default behavior is as if an implicit SET AUTOCOMMIT OFF has been issued.

  • The default setting is off.

ANSI Specifics

The SET AUTOCOMMIT statement is not part of the ANSI standard.

Adabas SQL Gateway Embedded SQL Specifics

None.

 

Example

 

set autocommit on ;