DisableCommit
PowerScript function
Description
Declares that a component’s transaction updates are inconsistent and
cannot be committed in their present state.
Applies to
TransactionServer objects
Syntax
1 |
transactionserver.DisableCommit ( ) |
Argument |
Description |
---|---|
transactionserver |
Reference to the TransactionServer service |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs.
Usage
The DisableCommit function indicates that the current transaction
cannot be committed because the component’s work has not been completed;
the instance remains active after the current method returns.
Examples
The following example shows the use of the DisableCommit in a
component method that performs database updates:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
// Instance variables: // DataStore ids_datastore // TransactionServer ts Integer li_rc long ll_rv li_rc = this.GetContextService("TransactionServer", & ts) IF li_rc <> 1 THEN // handle the error END IF ... ll_rv = ids_datastore.Update() IF ll_rv = 1 THEN ts.EnableCommit() ELSE ts.DisableCommit() END IF |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest