473,698 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use session variables or store in database?

I'm new to ASP. If I store information in these handy "session
variables" am I going to run into many limitations that I wouldn't have
it I added a database record for each session instead? For example, if
I use session variables, can I have an admin utility that lets me see a
list and/or count of all open sessions? Or would I be able to keep the
same user from starting multiple sessions if I wanted (by comparing the
log-in name which my web-site requires)? I know if I create a record
for each open session that I can do all kinds of fun stuff like reports
and queries, but not sure if I'll have all of those options with these
built in ASP session variables (which I imagine ASP stores in memory or
some non-standard format).

p.s.-I'm using ASP (not ASP.NET) with VBScript (I hate VB syntax but
that is what everyone seems to use).

Jul 22 '05 #1
2 1629
es***@surfbest. net wrote:
I'm new to ASP. If I store information in these handy "session
variables" am I going to run into many limitations that I wouldn't
have it I added a database record for each session instead? For
example, if I use session variables, can I have an admin utility that
lets me see a list and/or count of all open sessions?
No
Or would I be
able to keep the same user from starting multiple sessions if I
wanted (by comparing the log-in name which my web-site requires)?
No
I
know if I create a record for each open session that I can do all
kinds of fun stuff like reports and queries, but not sure if I'll
have all of those options with these built in ASP session variables
(which I imagine ASP stores in memory or some non-standard format).

You need a database. Look at:
http://www.aspfaq.com/show.asp?id=2491
http://www.aspfaq.com/show.asp?id=2078
p.s.-I'm using ASP (not ASP.NET) with VBScript (I hate VB syntax but
that is what everyone seems to use).


Not everyone. A few people on this list use jscript exclusively. Nothing
says you have to use vbscript.

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 22 '05 #2
Wow, thanks for the super fast reply! I'll check out those links, and
also look over the rest of the FAQ.

Jul 22 '05 #3

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

Similar topics

15
4384
by: | last post by:
Hi, I want to do things this way: I have a bunch of stuff that I want to keep track of while a user is connected to the site. Maybe 50 little peices of information. So I know I can make 50 session variables , or an store an array in a session variable, but what I wanna do is store it all in a class so I can use property get and property let.
3
9410
by: Jessica Loriena | last post by:
I'm trying to write a simple "register form / validate and store in database / show welcome screen" application with ASP.Net. With conventional ASP, I used Session variables and it went something like this: ***** form.asp - <form action="ValidateAndStore.asp" method="post">
8
3174
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example, if a user logs onto the website, a user object is created that stores their full name, email address, street address, phone, etc. This object also has methods to do 'other' things such as validations, counters,
3
1581
by: Matt Mercer | last post by:
Hi all, I have read much about session variables and the pros and cons. I want to post my use and get opinions. When a user logs into my site various fields are pulled from a SQL user table. I store the user's name, ID, country, region, site code, and access level in session variables. I use this information to decide what fields the user can see, what he
1
1994
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet environment. Currently the application has a search customers page with 10 search fields which list the results below the search fields. The requirement for this screen was that the user could return to this result page at any point from any page...
2
1757
by: Michaelk | last post by:
Can somebody tell me how many Session variables would be considered exessive, and when they start really affect the server speed. For example on 20-30 asp pages I need to use about 200-300 session variables and 5 arrays by 1000 elements 50 characters long each. Let say having 300 users using those pages at the same time. Server is not the fastest one, just CPU 2.40GHz. So question is as a user am I going to feel a difference in speed...
22
14890
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is done in 3 steps: Step 1. Normal http login page. Step 2. A page called login.php that takes the posted username, stores it as $_SESSION, and registers it session_register("username"); user is taken to the personalized page according to his username...
12
3828
by: MrHelpMe | last post by:
Hello again all, I've finished my whole application and now I don't like the whole session variables that I am using. I have a form, user fills in info clicks submit and using CDOSYSMail an email link gets created with an encoded query string. i.e http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into http://www.yahoo.ca?userID=54&LocationID=Denver. Now when the user get's this email and clicks on the link I have a
4
12591
by: =?Utf-8?B?YmFzdWxhc3o=?= | last post by:
Hi; I want to store a datatable (or an arraylist) as a session variable but when I try; Session = al_RecNo; I get an error that; "Cannot implicitly convert type 'System.Collections.ArrayList' to 'string'"
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7728
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.