beginDatabaseTransaction()

The sqlLib.beginDatabaseTransaction() system function 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.

The function is valid only for Java™ generation.

  sqlLib.beginDatabaseTransaction(
    [database STRING in])
database
A database name that you specified in sqlLib.connect(). Use a literal or variable of a character type.

If you do not specify a connection, the function affects the current connection. If you do not have an active connection, EGL opens the default connection for you. However, if you call beginDatabaseTransaction() with an argument and the specified connection is not open, EGL throws a RuntimeException.

When you invoke sqlLib.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 information about automatic commits, see "connect()" (sqlLib function). For information about the sqlCommitControl build descriptor option, see the EGL Generation Guide.


Feedback