IsTransactionAborted (obsolete)
PowerScript function
Description
Determines whether the current transaction, in which an
EAServer component participates, has been aborted.
Obsolete function
IsTransactionAborted is obsolete, because EAServer is no longer
supported since PowerBuilder 2017.
Applies to
TransactionServer objects
Syntax
1 |
transactionserver.IsTransactionAborted ( ) |
Argument |
Description |
---|---|
transactionserver |
Reference to the TransactionServer service |
Return value
Boolean.
Returns true if the current transaction has been aborted and
false if it has not.
Usage
The IsTransactionAborted function allows a component to verify that
the current transaction is still viable before performing updates to the
database.The IsTransactionAborted function corresponds to the
isRollbackOnly transaction primitive in EAServer.
Examples
The following example checks to see whether the transaction has been
aborted. If it has not, it updates the database and calls EnableCommit. If
it has been aborted, it calls DisableCommit.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
// Instance variables: ids_datastore, ts Integer li_rc long ll_rv li_rc = this.GetContextService("TransactionServer", ts) IF li_rc <> 1 THEN // handle the error END IF ... IF ts.IsTransactionAborted() = FALSE THEN ll_rv = ids_datastore.Update() IF ll_rv = 1 THEN ts.EnableCommit() ELSE ts.DisableCommit() END IF END IF |
See also