company logo

DBObjectHandle :: CommitTransaction - Commit transaction

The function stores all changes made in the transaction to the higher transaction level. When terminating a transaction for a given transaction level transactions on lower levels are committed as well. In contrast to other functions CommitTransaction() will not reset the error, i.e. after committing the transaction any error or warning set during the transaction is still set.

The function returns an error (YES), when the transaction could not be stored because of an error. This may happen when a top transaction tries to write to the database or when the transaction has set an error within the transaction that does not allow storing the transaction. In this case the error signaled while committing the transaction will overwrite any previously set error.

When passing AUTO (-1) as transaction level, the current (last recently opened) transaction will be closed.

Return value:  Success ( logical  )

Implementation details

logical DBObjectHandle  :: CommitTransaction ( int16 talevel=AUTO, logical version_opt=NO )
  • talevel - Transaction level

    The transaction level is usually 1.For nested transaction it corresponds to the nesting level.

    Default: AUTO
  • version_opt - Version option

    In order to avoid version checks for system entries, which are always written with version 0, version_opt has to be set to true.

    Default: NO