of_reset


pfcapsrv.pbl   >   pfc_n_cst_mru   >   of_reset   

Full name pfc_n_cst_mru.of_reset
Access public
Extend of integer
Return value integer
Prototype public function integer of_reset(string)

Name Datatype
No Data

Name Datatype
ll_count long
ll_row long
ll_rowcount long
ls_findstring string

public function integer of_reset (string as_id);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  	of_Reset
//
//	Access:  	public
//
//	Arguments:	
//	as_id			id to remove from the MRU datastore
//
//	Returns:  	Integer
//	SUCCESS = # of items removed
//	ERROR = -1
//
//	Description:  Remove data matching the id from a MRU datastore.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 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.
//
//////////////////////////////////////////////////////////////////////////////
long		ll_row, ll_rowcount, ll_count=0
string	ls_findstring

//check arguments
If IsNull(as_id) or (as_id = "") Then
	Return -1
End If

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

ll_rowcount = ids_mrukeys.Rowcount() + 1
ls_findstring = "s_id='" + as_id + "'"

// see if the id is in the datastore
ll_row = ids_mrukeys.Find(ls_findstring, 0, ll_rowcount)
Do While ll_row > 0
	ids_mrukeys.DeleteRow(ll_row)
	ll_count++
	ll_rowcount = ids_mrukeys.Rowcount() + 1
	ll_row = ids_mrukeys.Find(ls_findstring, 0, ll_rowcount)
Loop

Return ll_count
end function

     
Name Owner
pfc_n_cst_mru.of_unregister pfc_n_cst_mru

     
Name Owner
datastore.deleterow datastore
datastore.find datastore
datastore.rowcount datastore
systemfunctions.isnull systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions

     
Full name
No Data

     
Name Scope
No Data