Free threaded dictionary object. Lets you work with unique/non-unique keys, any VARIANT values and connect to other dictionary in the same process.
This html page shows basic operation with dictionary - Add, set and Remove dictionary item, RemoveAll, Connect, Disconnect and RemoveDictionary, enumerate Items, Keys and Dictionaries, Load and Save dictionary contents. This sample works only in local page or help, does not work from Internet for security reasons.
|Single dictionary elements|
|Add||Add a new key and item to the Dictionary.|
|Exists||Returns true if a specified key exists in the Dictionary object, false if it does not.|
|Remove||Removes a key and item pair(s) from the Dictionary object.||Dictionary to a file functions|
|Load||This method loads dictionary data stored by the Save method.|
|Save||Save all dictionary data to a file.||Share dictionaries|
|Connect||Lets you connect to another Dictionary object in the same process.|
|Disconnect||Disconect from the common named dictionary.|
|Lock||The Lock method blocks other clients from modifying the variables stored in the Dictionary object, ensuring that only one thread at a time can alter or access the dictionary variables.|
|RemoveDictionary||Remove the named dictionary or initialize the unnamed dictionary.|
|Unlock||The Unlock method enables other threads to modify the variables stored in the Dictionary object after it has been locked using the Lock method.||Other|
|RemoveAll||Removes all key and items from the Dictionary object.|
|Dictionaries||List of named dictionaries in the current process.|
|LockDuration||The time [ms] for which the dictionary is locked, -1 when the dictionary is not locked.|
|Name||Name of the connected common dictionary.|
|RefCounter||Number of connections to the dictionary data.|
|CompareMode||Sets and returns the comparison method for comparing string keys in the Dictionary object.|
|Item||The Item property returns or sets the value of a given Dictionary key.|
|UniqueKeys||Set or get unique keys property. Specifies a dictionary mode of Add method. If True (default), Add method does not allow to add two items with the same key.|
|Count||Returns the number of items of one specified key or in the Dictionary object.|
|Items||Array containing all items in the Dictionary object.|
|ItemsCount||Returns the number of items in a Dictionary object.|
|Keys||An array containing all existing keys in the Dictionary object.|
|KeysCount||A number of keys in the Dictionary object.|
|Key||Change a key in the Dictionary.|
MultiDictionary object can be also used to share dictionary data between more processes on one computer or between computers using Windows COM+ server application. This article contains step-by-step guide to setup COM+ application on server and clients.
Free-threaded (multithreaded) dictionary object. Lets you work with unique/non-unique keys in VBScript and JScript envinronment (share application/session variables in ASP) or any other programming language. You can share dictionary variables between processes or computers, you can save or restore dictionary variables to a disk, work with keys using regular expression and more.
Dictionary is a COM class specially designed as a free-threaded dictionary in Application scope of ASP/ASP.Net pages. It also works with script other engines in VB Script and JScript (ASP,ASP.Net, WSH, CHM, HTA), VB Net, Visual basic (VBA - VB 5, VB 6, Word, Excel, Access, …), C#, J#, C++, ASP, ASP.Net, Delphi and with T-SQL OLE functions - see Use ByteArray object article. You can also use the object in other programming environments with COM support, such is PowerBuilder.
Source code for Dictionary is available within distribution license, please see License page for Multi Dictionary or License page for ASP file upload and ScriptUtilities.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: firstname.lastname@example.org