of_getdatastore


pfcmain.pbl   >   pfc_u_tv   >   of_getdatastore   

Full name pfc_u_tv.of_getdatastore
Access public
Extend of integer
Return value integer
Prototype public function integer of_getdatastore(integer,ref n_ds)

Name Datatype
No Data

Name Datatype
li_Limit Integer

public function integer of_getdatastore (integer ai_level, ref n_ds ads_obj);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_GetDatastore
//
//	Access:  public
//
//	Arguments:
//	ai_Level					The level of the TreeView for which you want the DataStore.
//	ads_obj			The handle to the DataStore (of type n_ds) for the level.
//									Passed by reference.
//
//	Returns:		Integer
//					1	- the DataStore was found
//					-1	- the DataStore was not found
//
//	Description:	Return the DataStore a particular level in the TreeView points
//						to.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_Limit

li_Limit = UpperBound(inv_ds)
If ai_Level > li_Limit Then
	// Allow for recursion
	If Not inv_ds[li_Limit].b_Recursive Then Return -1
	
	ai_Level = li_Limit
End If

ads_obj = inv_ds[ai_Level].ds_obj

Return 1

end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data