subscript out of range error using vb and sql is usually caused by?????
Help
Thanks!!!
Printable View
subscript out of range error using vb and sql is usually caused by?????
Help
Thanks!!!
too many items in an array
I usually get this error when I've farkled up my loops.
If you are looping through your array (or recordset) and there are ten items in it. You need to reference for n = 0 to 9 or for n = 1 to 10. n refers to the index number. If you say for n = 0 to 10, it tries to loop through more times than you have elements in your array.
I'm sure there are more reasons why you may get this error but this is my most common.
Or this piece of code would also give error 9:
Dim arrValues() as string
x = arrValues(0)