commit

Executes the SQL statement COMMIT WORK.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

void commit([update])
keyword      update

Description

Starts an update transaction; default is read-only.
update (optional) specifies that the transaction is (read-write).

Notes

Some database management systems do not allow applications to specify read-only (update) transactions. Those systems ignore the update option.

Sybase 4.9

When the function executes commit(update), all Sybase access is performed through one database process. All list_open() calls must return all the desired data before another Sybase access is attempted. Otherwise, Sybase returns an error. lock_row() performs an implicit SELECT to Sybase. Executing a lock_row() with results pending causes an error.

Example

Inserts into a table and commit it.
{
commit(update);
exec_sql("INSERT INTO log VALUES (10,SYSDATE)");
commit();
}