Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP Application Object

Reply
Thread Tools

ASP Application Object

 
 
MEM
Guest
Posts: n/a
 
      11-23-2004
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.
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      11-23-2004
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

"MEM" <> wrote in message
news: om...
> 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.



 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      11-23-2004
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.

--
http://www.aspfaq.com/
(Reverse address to reply.)




"MEM" <> wrote in message
news: om...
> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use ASP.Net Profile object model by non ASP.net application =?Utf-8?B?Znc=?= ASP .Net 0 10-04-2007 05:17 PM
Asp.net application inside another Asp.net Application Ameen ASP .Net 3 10-18-2005 03:39 AM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
asp page calling com object within asp.net application =?Utf-8?B?b2dibGF5?= ASP .Net 0 02-29-2004 04:16 AM
COM object accessing asp Application object mrrrk ASP .Net 1 12-19-2003 09:37 AM



Advertisments