Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Variables or New Table

Status
Not open for further replies.

sbind77

Programmer
Oct 2, 2001
29
0
0
US
Hi
In my application
i need to maintain more than 20 variable in session.But when i browse thro different websites they mentioned using too may session variable is not advisable for a healthy application, so my thought process to overcome this problem is to creata table in the SqlServer(the database i am using) with the columns sessionid,fieldname,value where sessionid is the unique sessionid created for the user,fieldname is the name of my session variable and value is the value i stored for that session variable.

so I want know is there any other best method to overcome this session problem. Thank You
sbind77
 
instead of session variables, you can pass the information some other ways.

1) cookies
2) <input type = &quot;hidden&quot; name=&quot;myvar&quot; value=&quot;somevalue&quot;> (in a form)
or
3) in the url ie. mypage.asp?myvar=somevalue

depending on your situation, some of these may be better than others. For example, passing via the url is visible to the user and you maynot want that. If it's for the internet, cookies may not be enabled on the client machine.

You could read the info from a db but then....do you still even need the session variables?

hth
mb
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top