DB_FINISH_TRANSACTION()

Terminates a transaction level.

Syntax

DB_FINISH_TRANSACTION(
   commit INTEGER )
  RETURNING result INTEGER
  1. commit indicates whether the transaction must be committed.
  2. result is the SQL execution status or the commit or rollback.

Usage

This function encapsulates the COMMIT WORK or ROLLBACK WORK instructions to end a transaction.

When the number of calls to DB_START_TRANSACTION() matches, this function executes a COMMIT WORK if the passed parameter is TRUE; if the passed parameter is FALSE, it executes a ROLLBACK WORK.

If the number of calls does not match, the function does nothing.