bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
BEGINTRANS Statement Details
  ◄Syntax►  ◄Details►  ◄Example►                 ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
BEGINTRANS indicates the beginning of a transaction (a series of ISAM
database operations).
 
BEGINTRANS
 
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 the COMMITTRANS statement to commit a transaction.
    ■ Use the SAVEPOINT function to designate a savepoint.
    ■ Use the ROLLBACK and ROLLBACK ALL statements to rescind all or part
      of a transaction's operations.
    ■ If you attempt to use BEGINTRANS when there is already a transaction
      pending, BASIC generates the error message, "Illegal function call."
 
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.