[thelist] writing to existing array with VBScript

Joel D Canfield joel at spinhead.com
Tue Aug 14 23:06:24 CDT 2001


Beautiful. Did some quick reading at MSDN, and from now on the dictionary
object is my friend.

Thanks for the direct answer re VBS arrays; it makes the dictionary object
seem even more desirable.

joel

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Anthony Baratta
Sent: Tuesday, August 14, 2001 8:01 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] writing to existing array with VBScript


At 06:11 PM 8/14/2001, you wrote:
>I'm creating an empty array, then looping thru the results of a database
>query, writing the array elements as I go (for later use.) Here's what I've

Side Note: I hate VBS Arrays.

Joel....

You need to re-dim the array on the fly to accept more data, or
pre-dimension the array prior to use. In VBS array's are static and can not
be added to on the fly without re-dimensioning them.

Here are three solutions:

* ReDim the Array by one prior to adding data to it.

* Use a Dictionary Object instead

* Check out the Vector COM Object available here:
   http://www.caprockconsulting.com/comsoftware.asp

My recommendation is to screw the Array and use the Dictionary Object.
---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."






More information about the thelist mailing list