Syntax 1 For OLETxnObject objects
Description
Declares that the current transaction should be rolled back.
Controls
OLETxnObject objects
Syntax
1 |
<span>oletxnobject</span>.<span>SetAbort</span> ( <span> </span>) |
Argument |
Description |
---|---|
oletxnobject |
The name of the OLETxnObject variable |
Return Values
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 |
integer li_rc |
1 |
OleTxnObject lotxn_obj |
1 |
lotxn_obj = CREATE OleTxnObject |
1 |
li_rc = lotxn_obj.ConnectToNewObject("pbcom.n_test") |
1 |
IF li_rc <> 0 THEN |
1 |
Messagebox( "Connect Error", string(li_rc) ) |
1 |
// handle error |
1 |
END IF |
1 |
lotxn_obj.f_dowork() |
1 |
lotxn_obj.f_domorework() |
1 |
IF /* test for client satisfaction */ THEN |
1 |
lotxn_obj.SetComplete() |
1 |
ELSE |
1 |
lotxn_obj.<span>SetAbort</span>() |
1 |
END IF |
1 |
lotxn_obj.DisconnectObject() |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest