|
-
Mar 18th, 2002, 05:14 PM
#1
Thread Starter
Frenzied Member
Collections in VBScript?
I have a VBScript ASP, and I really want to use hash tables. I can use the VB Collection data structure as a hash table, but I can't get it to work in VBScript.
Am I correct in guessing that one can't use the Collection structure in VBScript?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Mar 18th, 2002, 06:39 PM
#2
How about using the Dictionary Object in asp/vbscript, its amost the same as the Collection object in VB.
Hope this helps.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2002, 09:44 AM
#3
Thread Starter
Frenzied Member
http://msdn.microsoft.com/library/de...bscripttoc.asp
MSDN is terribly not helpful. Is there any documentation on this dictionary data type?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Mar 19th, 2002, 10:04 AM
#4
Here is one, do search on google for "Dictionary Object" and you will find loads of links.
http://www.w3schools.com/asp/asp_ref_dictionary.asp
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2002, 10:28 AM
#5
Thread Starter
Frenzied Member
So, what is the difference between a dictionary structure and a collection structure?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Mar 19th, 2002, 10:50 AM
#6
Hi Travis,
Personally i havent used the Dictionary object, but have seen other people using it. Here is a link From MSDN which should answer your question.
I think asp.net supports collection object and something similar to hash table. Do check the specification of asp.net if you are interested.
http://support.microsoft.com/default...;EN-US;q187234
The Dictionary is quite similar to the Collection object in both functionality and purpose. The Dictionary, however, offers some functionality that is not available with a Collection. Some of these features include:
The option to specify a comparison method for Keys. This allows for a case-sensitive Key, for example.
A method for determining if an object exists in a Dictionary.
A method for extracting all of the Keys into an Array.
A method for extracting all of the Items into an Array.
A method for changing a Key value.
A method for removing all items from the Dictionary.
Dictionary Keys are not limited to String datatype.
NOTE: One important difference between the Collection object and the Dictionary object is the behavior of the Item property. If you use the Item property to reference a nonexistent Key in a Collection, you will receive an error. If you use the Item property to reference a nonexistent Key in a Dictionary, that Key will be added to the Dictionary. Use the Exists method to determine whether or not a Key is present in a Dictionary.
The Dictionary object is a component of the Microsoft Scripting library, which does not ship with Visual Basic version 5.0 or later.
Last edited by Danial; Mar 19th, 2002 at 10:58 AM.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 19th, 2002, 11:20 AM
#7
Thread Starter
Frenzied Member
Thanks for you help.
My client sees no immediate need to change to ASP.NET. And if I had any influence I would push them toward a more portable standard than .NET.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|