gdlp2004
asked on
Saving a two dimensional array into the session
I am leaving out some parts here, but the gist ie here. I have a 2 dimensional array called questionArray that I am populating through a nested looped query not included below.
<%DIM questionArray(24,5)
session("questions")=quest ionArray
Dim test(24,5)
test =session("questions")%> // Line Error is On
<%=test(0,1)%>
I get this error on the commented line above:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/unfquiz/index.asp, line 55
How can this be if I am setting the session array to the new array and they both have the same dimensions?
<%DIM questionArray(24,5)
session("questions")=quest
Dim test(24,5)
test =session("questions")%> // Line Error is On
<%=test(0,1)%>
I get this error on the commented line above:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/unfquiz/index.asp, line 55
How can this be if I am setting the session array to the new array and they both have the same dimensions?
I didn't think you could dump arrays into a session variable like that... You might be better concaternating it into a string first, with commas or semicolons seperating it, then use the split command to turn it back into an array when you pull it out of the session variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.