Link to home
Start Free TrialLog in
Avatar of gdlp2004
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")=questionArray

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?
Avatar of Fuzzyfish1000
Fuzzyfish1000
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of deighc
deighc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial