In Transaction

Determines whether a transaction is in progress in the current database connection.

Inputs

Database connection
A CwDBConnection object that represents the database connection.

Output

Returns true if there is a transaction in progress; otherwise, returns false.

Exceptions

The In Transaction function block can throw the CwDBConnectionException exception if a database error occurs.

Notes

The In Transaction function block returns a boolean value that indicates whether the current connection has an active transaction; that is, a transaction that has been started but not ended.

Important

Before beginning a transaction, you must create a CwDBConnection object with the Get Database Connection function block.

Related information

This function block is based on the CwDBConnection.inTransaction() method. For more information, see inTransaction().

Copyright IBM Corp. 2004