ASP Application Object

Discussion in 'ASP General' started by MEM, Nov 23, 2004.

  1. MEM

    MEM Guest

    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.
     
    MEM, Nov 23, 2004
    #1
    1. Advertising

  2. 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:...
    > 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.
     
    Ray Costanzo [MVP], Nov 23, 2004
    #2
    1. Advertising

  3. 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:...
    > 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.
     
    Aaron [SQL Server MVP], Nov 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mrrrk
    Replies:
    1
    Views:
    445
    mrrrk
    Dec 19, 2003
  2. =?Utf-8?B?b2dibGF5?=

    asp page calling com object within asp.net application

    =?Utf-8?B?b2dibGF5?=, Feb 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    368
    =?Utf-8?B?b2dibGF5?=
    Feb 29, 2004
  3. Andrew
    Replies:
    1
    Views:
    411
    Andrew
    Aug 8, 2005
  4. Ameen
    Replies:
    3
    Views:
    3,398
    Ameen
    Oct 18, 2005
  5. =?Utf-8?B?Znc=?=
    Replies:
    0
    Views:
    472
    =?Utf-8?B?Znc=?=
    Oct 4, 2007
Loading...

Share This Page