Skip to content

End_Transaction command

Include: Use Db\DBCommands.pkg

Purpose

Completes a Begin_Transaction block.

Syntax

Begin_Transaction
    // DD operations
End_Transaction

How it works

  • End_Transaction sends CommitTransaction to ghoDbTransactionManager.
  • If an error reaches the command's catch block, it sends RollbackTransaction and re-raises Last_Error_Number ErrText so the caller's error handler still sees the error.
  • The transaction manager commits only when nested depth returns to 0; any rollback resets the depth and notifies subscribed drivers.

Example

Begin_Transaction
    Clear oCustomerDD
    Move "Data Access" to oCustomerDD.Name
    SaveRecord oCustomerDD
End_Transaction

Begin_Transaction and End_Transaction are documented separately because each is a separate command.

See also