Tom Knowlton
asked on
Arrays in VBScript
How do I declare and use an array in VBScript?
My goal is to use an array to accumulate a bunch of SQL statements.....then loop through them and run Conn.Execute(array[x]) for each one.
My goal is to use an array to accumulate a bunch of SQL statements.....then loop through them and run Conn.Execute(array[x]) for each one.
Dim newArray()
ASKER
And then how would I add elements to the array?
here's the rest:
for i = 0 to UBound(newArray)
newArray(i) = "newValue" & i
next
for i = 0 to UBound(newArray)
newArray(i) = "newValue" & i
next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to add elements to the array inside different Subroutine and Function calls.....then when the user clicks "submit"....loop through the array.
ASKER
The array would have to be global to the various ASP pages that use it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will probably just DIM the array to handle say 20 elements.
This should be more than I need.
This should be more than I need.
so...did I answer your question? if so, please reward me the points, I need to ask a few others.
thanks.
thanks.
ASKER
samdig: I am evaluating all the answers I have gotten.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
alorentz (and the other Experts).
I want to change the way I am doing things.....and have JavaScript control the game board at runtime, and record the information behind each game piece:
https://www.experts-exchange.com/questions/20936405/Array-of-Structs.html
I want to change the way I am doing things.....and have JavaScript control the game board at runtime, and record the information behind each game piece:
https://www.experts-exchange.com/questions/20936405/Array-of-Structs.html
Sorry, that's why I'm in the ASP area...I don't support Javascript unless I have too.
ASKER
Fair enough. :)