COMMIT

Description

Permanently updates all database operations since the previous COMMIT, ROLLBACK, or CONNECT for the specified transaction object.

NoteUsing COMMIT and ROLLBACK in a server component Server component connections are not supported in PocketBuilder. For information on COMMIT and ROLLBACK commands embedded in a server component, see Connecting to Your Database and Application Techniques in the PowerBuilder documentation set.

Syntax

COMMIT {USING TransactionObject};

Parameter

Description

TransactionObject

The name of the transaction object for which you want to permanently update all database operations since the previous COMMIT, ROLLBACK, or CONNECT. This clause is required only for transaction objects other than the default (SQLCA).

Usage

COMMIT does not cause a disconnect, but it does close all open cursors or procedures. (But note that the DISCONNECT statement in PocketBuilder does issue a COMMIT.)

NoteError handling It is good practice to test the success/failure code after executing a COMMIT statement.

Examples

Example 1

Example 1 This statement commits all operations for the database specified in the default transaction object:

COMMIT ;

Example 2

Example 2 This statement commits all operations for the database specified in the transaction object named Emp_tran:

COMMIT USING Emp_tran ;