Syntax 1: For OLETxnObject objects
Description
Declares that the current transaction should be rolled
back.
Applies to
OLETxnObject objects
Syntax
1 |
oletxnobject.SetAbort ( ) |
Argument |
Description |
---|---|
oletxnobject |
The name of the OLETxnObject variable that is connected |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs.
Usage
Call the SetAbort function from the client to force a COM+
transaction to be rolled back. The default is to complete the
transaction if all participants in the transaction on the COM+ server
have called SetComplete or EnableCommit.
Examples
The following example shows the use of SetAbort in a component
method that performs database updates:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
integer li_rc OleTxnObject lotxn_obj lotxn_obj = CREATE OleTxnObject li_rc = lotxn_obj.ConnectToNewObject("pbcom.n_test") IF li_rc <> 0 THEN Messagebox( "Connect Error", string(li_rc) ) // handle error END IF lotxn_obj.f_dowork() lotxn_obj.f_domorework() IF /* test for client satisfaction */ THEN lotxn_obj.SetComplete() ELSE lotxn_obj.SetAbort() END IF lotxn_obj.DisconnectObject() |
See also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest