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_TransactionsendsCommitTransactiontoghoDbTransactionManager.- If an error reaches the command's catch block, it sends
RollbackTransactionand re-raisesLast_Error_Number ErrTextso 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.