of_registerargs


pfcapsrv.pbl   >   pfc_n_cst_dwcache   >   of_registerargs   

Full name pfc_n_cst_dwcache.of_registerargs
Access public
Extend of integer
Return value integer
Prototype public function integer of_registerargs(string,any[20])

Name Datatype
No Data

Name Datatype
li_cnt Integer
li_index Integer
li_rc Integer
li_upper Integer

public function integer of_registerargs (string as_id, any aa_args[20]);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_RegisterArgs
//
//	Access:  protected
//
//	Arguments:
//	as_id					The registered ID.
//	aa_args				The actual arguments.
//
//	Returns:  integer

//	1 successful.
//	-1 error.
//
//	Description:
//	Change the Arguement value(s) of an already registered object.
//	*Note: If no load is performed, the 'loading' checks will be skipped.
//	Among other tests, it means that the new retrieval arguments may not be valid.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.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_rc
Integer 	li_upper=0
Integer	li_cnt=0
Integer	li_index=0

// Trim and Convert the ID to lower case.
as_id = Trim(Lower(as_id))

// Check for a valid ID
If IsNull(as_id) or Len(Trim(as_id))= 0 Then
	Return -1
End If

// Confirm that the ID is registered.
li_upper = UpperBound (inv_cachelist)
For li_cnt = 1 to li_upper
	If inv_cachelist[li_cnt].s_id = as_id Then 
		// The ID index has been found.
		li_index = li_cnt
		Exit
	End If
Next
If li_index = 0 Then
	// The ID is not registered.
	Return -1
End If

// Confirm that the method is 'Retrieve'.
If inv_cachelist[li_index].s_method <> RETRIEVE Then
	Return -1
End IF

// Confirm that the number of arguments match the previous number of arguments.
li_upper = UpperBound(inv_cachelist[li_index].a_args)
If li_upper <> UpperBound(aa_args) Then
	Return -1
End If

// Replace the arguments for future use on Retrieval process.
inv_cachelist[li_index].a_args = aa_args

Return 1
end function

     
Name Owner
pfc_n_cst_tvsrv_levelsource.of_retrieve pfc_n_cst_tvsrv_levelsource
pfc_n_cst_lvsrv_datasource.of_Retrieve pfc_n_cst_lvsrv_datasource

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.len systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data