Language Reference Guide : 4. System Classes : StringHashTable Class : RemoveObject Method
 
Share this page                  
RemoveObject Method
The RemoveObject method removes the object (or all objects) with the specified key from the hash table. If there are multiple objects with the same key, it will remove either only the first object with the key found (if allobjects=FALSE) or all objects with the key (if allobjects=TRUE).
Note:  The order of objects with the same key is undefined.
The BYREF parameter removedcount will contain the count of objects removed.
This method has the following syntax:
integer = StringHashTable.RemoveObject(
          key = varchar(2000) [, allobjects = integer]
          [, removedcount = BYREF(integer_variable)])
This method has the following parameters:
key
Specifies the key of the object to remove
allobjects
Specifies whether all objects should be removed. Valid values include:
TRUE
Specifies that all of the objects with the specified key should be removed
FALSE
Specifies that only the first object with the specified key should be removed
Default: FALSE
removedcount
Contains the number of objects removed
This method returns ER_OK if successful, ER_KEYNOTFOUND if the key does not exist, and ER_FAIL if an error occurred. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.