Table of Contents Previous Next



7.5.4 COMMIT
Use the COMMIT statement to complete the current transaction, making all changes permanent and visible to other users. The syntax is:
EXEC SQL [AT database_name] COMMIT [WORK]
[COMMENT
'text'] [COMMENT 'text' RELEASE];
database_name is the name of the database (or host variable that contains the name of the database) in which the work resides. This value may take the form of an unquoted string literal, or of a host variable.
For compatibility, ECPGPlus accepts the COMMENT clause without error but does not store any text included with the COMMENT clause.
Include the RELEASE clause to close the current connection after performing the commit.
For example, the following command commits all work performed on the dept database and closes the current connection:
By default, statements are committed only when a client application performs a COMMIT statement. Include the -t option when invoking ECPGPlus to specify that a client application should invoke AUTOCOMMIT functionality. You can also control AUTOCOMMIT functionality in a client application with the following statements:


Table of Contents Previous Next