COMMIT
SQL statement
Description
Permanently updates all database operations since the previous
COMMIT, ROLLBACK, or CONNECT for the specified transaction
object.
Syntax
|
1 |
COMMIT {USING TransactionObject}; |
|
Parameter |
Description |
|---|---|
|
TransactionObject |
The name of the transaction object for which you |
Usage
COMMIT does not cause a disconnect, but it does close all open
cursors or procedures. (But note that the DISCONNECT statement in
PowerBuilder does issue a COMMIT.)
Error handling
It is good practice to test the success/failure code after
executing a COMMIT statement.
Examples
Example 1
This statement commits all operations for the database specified
in the default transaction object:
|
1 |
COMMIT ; |
Example 2
This statement commits all operations for the database specified
in the transaction object named Emp_tran:
|
1 |
COMMIT USING Emp_tran ; |