ASP Application Object

M

MEM

Hello,

I'm using application variables for a web based sales tracking
application. I use the variables for stuff like connection string,
database name, etc. I store the values in a asp file that is included
in a login page. The assignments are in a routine/procedure that I
then call on the login page. This is done everytime a user connects to
the login page.

So, what's happening to the variables? Are they being overwritten
everytime a user accesses the page? I'm not checking for the existence
of the variables. I just call the routine everytime the page is
accessed. I know the values are shared for all users but, I was
wondering if I should check for the existence of the variables? Will
it free up resources? Should I be using locks?

Thanks.
 
R

Ray Costanzo [MVP]

Yes, they are probably being overwritten. Is there any reason you're not
creating the variables in Application_OnStart in a global.asa file?

Ray at work
 
A

Aaron [SQL Server MVP]

I think you are confusing application and session. Sessions survive the
lifetime of a user connected to the application. The application outlasts
user sessions. It would make more sense, as Ray suggests, to populate these
variables in application_onstart.
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top