|
of_getregistered
|
|
Full name
|
pfc_n_cst_dwcache.of_getregistered
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getregistered(string,ref n_ds)
|
Name
|
Datatype
|
li_cnt
|
Integer
|
li_upper
|
Integer
|
public function integer of_getregistered (string as_id, ref n_ds ads_cache);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetRegistered
//
// Access: public
//
// Arguments:
// as_id The ID of the registered datastore for which a reference is wanted.
// ads_cache A reference to the Datastore matching the passed ID (by reference).
//
// Returns: integer
// 1 success the ads_cache holds the desired reference.
// -1 error.
//
// Description:
// Returns a reference to the Datastore matching the passed ID.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_upper=0
Integer li_cnt=0
// Trim and Convert the ID to lower case.
as_id = Trim(Lower(as_id))
// Loop around all objects to find the matching ID.
li_upper = UpperBound(inv_cachelist)
For li_cnt = 1 to li_upper
If as_id = inv_cachelist[li_cnt].s_id Then
If IsNull(inv_cachelist[li_cnt].ds_obj) Or &
Not IsValid(inv_cachelist[li_cnt].ds_obj) Then
Return -1
End If
// A Registered Datastore has been found.
ads_cache = inv_cachelist[li_cnt].ds_obj
Return 1
End If
Next
// A matching ID was not found.
Return -1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|