[thelist] writing to existing array with VBScript
Anthony Baratta
Anthony at Baratta.com
Tue Aug 14 22:00:00 CDT 2001
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