Hive - Alternative to Collection and Dictionary
Version Compatibility: Visual Basic 6, Visual Basic 5
It supports non string keys. You can use Date or Number as a key. Very useful for storing numbered items or calendar information where the key is a date.
It has Auto key generation feature. Items can be added without any key for indexed based access. Auto Key is a GUID which is always unique.
Much faster than VB's Collection even faster than the Dictionary object.
It supports multiple items with same key. It also provides FindFirst, FindNext methods like ADO Recordset for duplicate key.
It supports both case sensitive and non case sensitive key matching support at run-time.
Its Clear method immediately releases memory very efficiently for both object and variant data type.
It supports "Exists" method to check whether a key exist or not.
It supports value modification which is not present in collection. Any value for a key can be reassigned at any time.
It supports Key method to get a key from index.
It can replace VB Collection's code without any change.
It can record errors raised from invalid add, remove. It provides an error collection like ADO's Error collection. Error raise can be turned off anytime.
It uses a balanced binary tree (Red Black Binary Tree) for better performance than standard Binary Tree based data structures.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.