bas7advr.hlp (Topic list)
COMMITTRANS Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
COMMITTRANS commits a pending transaction (a series of ISAM database
operations).
 
COMMITTRANS
 
Usage Notes
    ■ Transactions are a way to group a series of ISAM operations so that
      you can commit them as a whole, rescind them all, or rescind
      operations since a designated savepoint.
    ■ Use BEGINTRANS to indicate the beginning of a transaction.
    ■ Use SAVEPOINT to designate a savepoint.
    ■ Use ROLLBACK and ROLLBACK ALL to rescind all or part of a transaction's
      operations.
    ■ If there is no transaction pending, BASIC generates the error
      message, "Illegal function call."
    ■ COMMITTRANS commits only ISAM operations. It does not affect other
      BASIC variables or file types.
 
Programming Tips
    ■ Any ISAM operation that closes a table causes transactions to be
      committed. For example, if a type mismatch occurs while you are
      opening an ISAM table, the table is closed and a pending transaction
      is committed.
    ■ You may wish to code your programs so they first open all tables,
      then perform all transactions, then close tables. Make sure any
      operation that can close a table occurs outside a transaction.