beginDatabaseTransaction()

The system function SysLib.beginDatabaseTransaction begins a relational-database transaction, but only when the EGL runtime is not committing changes automatically. If changes are being committed automatically, the function has no effect.

  SysLib.beginDatabaseTransaction(
    [database STRING in])
database
A database name that was specified in SysLib.connect or VGLib.connectionService. Use a literal or variable of a character type.

If you do not specify a connection, the function affects the current connection.

When you invoke SysLib.beginDatabaseTransaction, a transaction begins at the next I/O operation that uses the specified connection; and the transaction ends when a commit or rollback occurs, as described in Logical unit of work. After the commit or rollback, the EGL runtime resumes committing changes automatically.

For details on automatic commits, see SysLib.connect and sqlCommitControl.

Related concepts
Syntax diagram for EGL functions
Logical unit of work
SQL support

Related reference
sqlCommitControl
connect()
connectionService()

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.