<-- Previous || Up || Next -->

Update Function
Hash Table Class

Public Function Update( _
      ByVal vKey As Variant _
    , ByVal vItem As Variant _
    ) As Boolean

Update the Item of the hash table definition identified by Key.

Example:
    Assuming
       Dim htTemp As New HashTable
       htTemp.Add "FunctionName", 23
       Dim bResult As Boolean
    for example
       bResult = htTemp.Update("FunctionName", 24)
    leaves
       bResult = True
    and
       bResult = htTemp.Update("StringReverse", 24)
    leaves
       bResult = False
vKey: The string or numeric identifier whose Item will be updated to vItem.
vItem: New Item that will be associated with the key vKey if that key already exists within the hash table. vItem can be any type of Variant value (vbString, numeric, vbDate, vbObject, vbArray, etc.).
Return value: Method returns True if the Key was found and the Item was updated, and it returns False otherwise.
See also:
    AddOrUpdate Method
    Add Method
    AddFromHashTable Method
    Lookup Method
    Remove Method
v1.3 BugFix: This method has been fixed to support the storage of Object and DataObject type Items.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.