|
of_getbyname
|
|
Full name
|
pfc_n_cst_trregistration.of_getbyname
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getbyname(string,ref n_tr)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_upperbound
|
integer
|
ls_name
|
string
|
public function integer of_getbyname (string as_name, ref n_tr atr_obj);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetByName
//
// Access: public
//
// Arguments:
// as_name: name of the transaction object to get a reference for
// atr_obj: transaction object by reference
//
// Returns: integer
// 1 = success
// 0 = transaction object not found
//
// Description: Gets a reference to the registered trans object based on
// the name specified.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
string ls_name
// Loop through the registered array.
li_upperbound = UpperBound (inv_trans)
for li_cnt = 1 to li_upperbound
if inv_trans[li_cnt].b_used and IsValid (inv_trans[li_cnt].tr_object) then
ls_name = inv_trans[li_cnt].tr_object.of_GetName()
if ls_name = as_name then
// Transaction was found.
atr_obj = inv_trans[li_cnt].tr_object
Return 1
end if
end if
next
// Transaction was not found.
return 0
end function
Name
|
Owner
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|
pfc_n_tr.of_GetName |
pfc_n_tr
|