re-fire global.asa ?

Discussion in 'ASP General' started by Ted Dawson, Oct 10, 2004.

  1. Ted Dawson

    Ted Dawson Guest

    Last week I was storing my variables in a database and retrieving them on
    every page of my application, but this week I want to retrieve them only
    once and store them in an application variable. This works, but if I have to
    change one of the variables, the application variable remains unchanged
    until the web server is restarted, thus re-firing global.asa.

    Is there a way to force global to fire again, refreshing my variables?
     
    Ted Dawson, Oct 10, 2004
    #1
    1. Advertising

  2. Ted Dawson

    Evertjan. Guest

    Ted Dawson wrote on 10 okt 2004 in
    microsoft.public.inetserver.asp.general:

    > Last week I was storing my variables in a database and retrieving them
    > on every page of my application, but this week I want to retrieve them
    > only once and store them in an application variable. This works, but
    > if I have to change one of the variables, the application variable
    > remains unchanged until the web server is restarted, thus re-firing
    > global.asa.


    Perhaps next week ...

    Seriously, I do not believe you cannot change application variables in real
    time. My active visitor counter would not work, if that were true

    > Is there a way to force global to fire again, refreshing my variables?


    Yes, but you will end all the active sessions.
    Your users will not like that.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress,
    but let us keep the discussions in the newsgroup)
     
    Evertjan., Oct 10, 2004
    #2
    1. Advertising

  3. Ted Dawson

    dlbjr Guest

    Ted,

    They are application Variables. So when you make changes to the variables and save to the database
    just do this.

    Application.Lock
    Application("VAR1") = var1newvalue
    """
    """
    """
    Application.UnLock

    This will update the variables and not loss the session variable data to connected clients.

    --
    'dlbjr
    'Pleading sagacious indoctrination!
     
    dlbjr, Oct 10, 2004
    #3
  4. Ted Dawson

    Ted Dawson Guest

    Thank you, works great!



    Ted



    "dlbjr" <> wrote in message
    news:...
    > Ted,
    >
    > They are application Variables. So when you make changes to the variables
    > and save to the database
    > just do this.
    >
    > Application.Lock
    > Application("VAR1") = var1newvalue
    > """
    > """
    > """
    > Application.UnLock
    >
    > This will update the variables and not loss the session variable data to
    > connected clients.
    >
    > --
    > 'dlbjr
    > 'Pleading sagacious indoctrination!
    >
    >
     
    Ted Dawson, Oct 11, 2004
    #4
    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. Darlene Gauthier

    PostRequestHandlerExecute event in global.asa

    Darlene Gauthier, Jul 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,439
    Karl Seguin
    Jul 23, 2003
  2. Kevin Spencer

    Re: global.asa file (count sessions)

    Kevin Spencer, Jul 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    358
    Kevin Spencer
    Jul 30, 2003
  3. DevBoy

    Global.asa File ?????

    DevBoy, Aug 12, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    Rick Strahl [MVP]
    Aug 13, 2003
  4. Wayne
    Replies:
    2
    Views:
    485
    Wayne
    Nov 11, 2003
  5. David Morgan
    Replies:
    2
    Views:
    132
    David Morgan
    Nov 9, 2007
Loading...

Share This Page