W
Wayne Wengert
I am trying to add one column to an existing array (code below). The ReDim
command gives the error:
-----------------------------------------------
Microsoft VBScript runtime error '800a0009'
Subscript out of range
/ListCGShowsGrouped.asp, line 58
------------------------------------------------
The Response.Write shows that the array has 9 rows and 3 cols (it displays 8
and 2) before the redim and I want a 9 x 4 after the redim.
What am I doing wrong here?
============ Code ===============
........
aryShows = myRS.GetRows
intRows = Ubound(aryShows,2)
intCols = Ubound(aryShows,1)
MyRS.Close
Response.Write("Rows: " & introws & " - Cols: " & intcols & "<br>")
Redim Preserve aryShows(intCols + 1, introws)
command gives the error:
-----------------------------------------------
Microsoft VBScript runtime error '800a0009'
Subscript out of range
/ListCGShowsGrouped.asp, line 58
------------------------------------------------
The Response.Write shows that the array has 9 rows and 3 cols (it displays 8
and 2) before the redim and I want a 9 x 4 after the redim.
What am I doing wrong here?
============ Code ===============
........
aryShows = myRS.GetRows
intRows = Ubound(aryShows,2)
intCols = Ubound(aryShows,1)
MyRS.Close
Response.Write("Rows: " & introws & " - Cols: " & intcols & "<br>")
Redim Preserve aryShows(intCols + 1, introws)