|
of_unregister
|
|
Full name
|
pfc_n_cst_trregistration.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(n_tr)
|
Name
|
Datatype
|
lb_found
|
boolean
|
li_cnt
|
integer
|
li_upperbound
|
integer
|
public function integer of_unregister (n_tr atr_obj);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: public
//
// Arguments:
// atr_obj transaction object to be unregistered
//
// Returns: integer
// 1 = successful unregister
// 0 = the specified trans object was not registered
// -1 = error
//
// Description:
// Unregisters a transaction object from the service.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1999 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
integer li_upperbound
integer li_cnt = 1
boolean lb_found
// Check arguments
if IsNull(atr_obj) Or not IsValid (atr_obj) then
return -1
end if
// Find transaction object to unregister
li_upperbound = UpperBound (inv_trans)
do while not lb_found and li_cnt <= li_upperbound
if inv_trans[li_cnt].tr_object = atr_obj then
// Unregister the transaction.
inv_trans[li_cnt].b_used = false
SetNull (inv_trans[li_cnt].tr_object)
// Decrease count of registered transaction objects.
ii_count --
Return 1
end if
li_cnt++
loop
// Trans object not found.
return 0
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|