473,413 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

simple question on vbScript SET statement

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?
Jul 19 '05 #1
2 1449
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!
Jul 19 '05 #2
qw******@qwestion.com wrote:
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/ar.../18/53050.aspx
http://blogs.msdn.com/ericlippert/ar.../19/53054.aspx

A good alternative is a free-threaded XML document.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
3
by: Matt | last post by:
When the ASP statement end with a _ character, then the next line cannot have comment ' character. Is that correct? Since I encountered the following error: Microsoft VBScript compilation...
1
by: Jill | last post by:
I am trying to store the current date to an ms access database on my server. I set it up with a dsnless connection. Here is the statement: Insert Into employees(timestamp) Values ('" & date() &...
2
by: megandelune | last post by:
I have been learning ASP from a book I bought a week ago and so far it is very informative, but I seem to be confused on one simple term. Variant. Now I learned how to declare a varible with the...
9
by: Pete | last post by:
Does anyone have a simple html vbscript or other type of snippet they can share that appends a record to a access database via ADO or DAO? I would like to allow users that don't have Microsoft...
7
by: skeddy | last post by:
In a nutshell, I'm trying to dynamically create a select box with ResultSet code in vbscript and then need to be able to access the value of that select box later with a Save button. I've got...
2
by: Lawrence | last post by:
Hi I have only begun to look into ASP due to an assignments requirements (I usually code in PHP), one feature in PHP is to be able to do an if...else statement, where if a certain statement is...
7
by: Kandiman | last post by:
Hello, Im hoping you can help, for now im trying to learn how to do something so an easy example may help me to gain the concept. I wish to create a hyperlink that when i click it, it prints my...
5
by: MicheleG | last post by:
Hi to all! I created a VB.Net COM DLL which I can use in VBScript. I followed the steps in the following article: http://msdn2.microsoft.com/en-us/library/x66s8zcd(VS.71).aspx (I used the method...
1
by: Derek Hart | last post by:
I am using an MSScriptControl in vb.net to do an evaluation of a text string: tempAnswer = MyScriptControl.Eval(MyScriptString) But how can I use this to get a return value from a vbscript...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.