Previous Topic Next topic Print topic


SET AUTOCOMMIT

Enables you to control ODBC AUTOCOMMIT mode at runtime.

Syntax:

>>--EXEC SQL--SET AUTOCOMMIT---.-ON--.---END-EXEC--><
                               +-OFF-+ 

Parameters:

ON Changes to AUTOCOMMIT mode, whereby each SQL statement is treated as a separate transaction and is committed immediately upon execution.
OFF Switches off AUTOCOMMIT mode. If the ODBC driver you are using supports transactions, statements must be explicitly committed (or rolled back) as part of a transaction.

Comments:

The SET AUTOCOMMIT statement is useful for data sources which can only execute DDL statements, such as CREATE and DROP, in AUTOCOMMIT mode.

This statement overrides the AUTOCOMMIT SQL compiler directive.

Example:

EXEC SQL SET AUTOCOMMIT ON END-EXEC
Previous Topic Next topic Print topic