ASP Application Object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MEM

    ASP Application Object

    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]

    #2
    Re: ASP Application Object

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

    Ray at work

    "MEM" <mmaxsom@citlin k.net> wrote in message
    news:9403d191.0 411231233.48b78 f46@posting.goo gle.com...[color=blue]
    > 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.[/color]


    Comment

    • Aaron [SQL Server MVP]

      #3
      Re: ASP Application Object

      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_ons tart.

      --
      Please contact this domain's administrator as their DNS Made Easy services have expired.

      (Reverse address to reply.)




      "MEM" <mmaxsom@citlin k.net> wrote in message
      news:9403d191.0 411231233.48b78 f46@posting.goo gle.com...[color=blue]
      > 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.[/color]


      Comment

      • MEM

        #4
        Re: ASP Application Object

        What's the benefits of using the global.asa file versus an asp
        include? Also, when creating the application folder in IIS, does it
        automatically create a global.asa file?

        "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<Oo$dh5Z0E HA.4004@tk2msft ngp13.phx.gbl>. ..[color=blue]
        > Yes, they are probably being overwritten. Is there any reason you're not
        > creating the variables in Application_OnS tart in a global.asa file?
        >
        > Ray at work
        >
        > "MEM" <mmaxsom@citlin k.net> wrote in message
        > news:9403d191.0 411231233.48b78 f46@posting.goo gle.com...[color=green]
        > > 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.[/color][/color]

        Comment

        • Jason Brown [MSFT]

          #5
          Re: ASP Application Object

          benefits vs an include? well, they're two different animals, but basically a
          global.asa runs at the start of the session and the start of an application,
          so it's the logical place to set app and session variables which don't
          depend on some sort of user input.

          no, a global.asa is not created automatically by IIS, but may be created by
          your editor, depending on what you use


          --
          Jason Brown
          Microsoft GTSC, IIS

          This posting is provided "AS IS" with no warranties, and confers no
          rights.


          "MEM" <mmaxsom@citlin k.net> wrote in message
          news:9403d191.0 411241653.e427d 8f@posting.goog le.com...[color=blue]
          > What's the benefits of using the global.asa file versus an asp
          > include? Also, when creating the application folder in IIS, does it
          > automatically create a global.asa file?
          >
          > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
          > message news:<Oo$dh5Z0E HA.4004@tk2msft ngp13.phx.gbl>. ..[color=green]
          >> Yes, they are probably being overwritten. Is there any reason you're not
          >> creating the variables in Application_OnS tart in a global.asa file?
          >>
          >> Ray at work
          >>
          >> "MEM" <mmaxsom@citlin k.net> wrote in message
          >> news:9403d191.0 411231233.48b78 f46@posting.goo gle.com...[color=darkred]
          >> > 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.[/color][/color][/color]


          Comment

          Working...