SQL support / Database transactions |
Starts a database transaction in the current connection.
BEGIN WORK
Use the BEGIN WORK instruction to indicate where the database transaction starts in your program. Each row that an UPDATE, DELETE, or INSERT statement affects during a transaction is locked and remains locked throughout the transaction.
BEGIN WORK is part of the language syntax, the underlying database driver executes the native SQL statement corresponding to this SQL instruction.
MAIN DATABASE stock BEGIN WORK INSERT INTO items VALUES ( ... ) UPDATE items SET ... COMMIT WORK END MAIN