Bt_AbortTransaction() Function
<< Click to Display Table of Contents >>
Bt_AbortTransaction() Function
|
|
Purpose
Abort the current transaction and remove the results of all active operations
Prototype
FUNCTION Bt_AbortTransaction ( nid := 0 AS WORD ) AS LOGIC
Argument(s)
<nId> (Optional) Client ID to abort transaction for
Return
LOGIC TRUE if successful.
Description
Directs the server to rollback all pending updates for the current transaction. Pending updates are any updates made since the most recent Bt_BeginTransaction(). This is an inelegant and ungraceful way to back out of a transaction. Use it only in an emergency.
Example(s)
* Start transaction
Bt_BeginTransaction()
IF <transaction completed ok>
* End transaction
Bt_EndTransaction()
ELSE
* Roll back transaction
Bt_AbortTransaction()
ENDIF
See Also
Bt_BeginTransaction(), Bt_EndTransaction()