Also use the following functions since variables are Empty by default
If IsEmpty(myvar) Then....
or
If IsArray(myvar) Then
Redim blah(20)
Session("myvar") = blah
End If
--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm
"please-answer-here" <no***@nohost.nodomain.invalid> wrote in message
news:42***********************@dreader2.cybercity. dk...
Mark J. McGinty wrote: "please-answer-here" <no***@nohost.nodomain.invalid> wrote in message
news:ep**************@TK2MSFTNGP14.phx.gbl... I want to store a bunch of textstrings (about 500) returned from a
database query in a session array. I've googled all over the net,
not to find any working method.
Is there anybody who has the ultimative, definite working method as
to how you transfer a "local" array to a session array and later
transfer the session array to a "local" array.
Simply assign it.
Dim MyArray(500, 10)
Session("MyArray") = MyArray
The only caveat is that you must assign it from the session to a local
variable before attempting to reference any of it's elements
Dim MyArray, ele
MyArray = Session("MyArray")
ele = MyArray(1, 1)
You cannot reference elements in the session object directly:
Dim ele
ele = Session("MyArray")(1, 1) ' does NOT work
Yes that was exactly what I found out, but in my case it didn't work (got
all sorts of errormessages type mismatch / index out of range) Will take a
closer look at my own code
thanks for the assistance !
-Mark
regards
Henning