simple question on vbScript SET statement

Q

qwestion

Simply:

On one .asp page I have:
Set Session("mydictionary") = [dictionary object]

Now the session variable has the dictionary object in it, then on
another page ...

Set x = Session("mydictionary")
.... and I use the "x" variable with the properties of that object,
etc.

Question:
Is "Set x = nothing" needed before the .asp page ends processing or
redirects?

From what I know the "x" variable is just a reference and does not
need to be set to "nothing"... correct?
 
D

dlbjr

Do Not use Dictionaries as a Session or Application Variable!

I would serialize the data to a string, then encrypt it and place in a hidden field on the page.
When the next page calls the server, deserialize the data, load the object, and do what ever.
This will reduce the use of session vars and ram on the server. Remember the site will only grow, so
built it scalable.

dlbjr
Pleading sagacious indoctrination!
 
B

Bob Barrows [MVP]

Simply:

On one .asp page I have:
Set Session("mydictionary") = [dictionary object]

Now the session variable has the dictionary object in it, then on
another page ...

Set x = Session("mydictionary")
... and I use the "x" variable with the properties of that object,
etc.

Question:
Is "Set x = nothing" needed before the .asp page ends processing or
redirects?

From what I know the "x" variable is just a reference and does not
need to be set to "nothing"... correct?

Don't put a Dictionary object in Session:
http://blogs.msdn.com/ericlippert/archive/2003/09/18/53050.aspx
http://blogs.msdn.com/ericlippert/archive/2003/09/19/53054.aspx

A good alternative is a free-threaded XML document.


Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top