Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Application variables
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 31 October 2001 :  00:26:58  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I peaked at the snitz code, and I noticed whenever an application variable gets defined or re-defined, Application.Lock and Application.Unlock are used. I also sorta copied the code in config.asp to re-define the variables if the admin changed something.

So, in admin_admin.asp for my new program, after updating the config table, I have:

Application.Lock
Application("t-configloaded") = "no"
Application.UnLock

And in the _top.asp file I have the following...
configloaded = Application("t-configloaded")
if configloaded = "no" or configloaded = "" or IsNull(Application("t-configloaded")) then
strsql = "SELECT SHOWBANNERS, APPROVESITES, SITESTOSHOW, BANNER1, BANNER2, BANNER3, BANNER4, BANNER5, SITEBANNERSTOSHOW FROM ADMIN"
set rs = t_conn.execute(strsql)
Application.Lock
Application("t-showbanners") = rs("SHOWBANNERS")
Application("t_sitebanners") = rs("SITEBANNERSTOSHOW")
Application("t-approvesites") = rs("APPROVESITES")
Application("t-sitestoshow") = rs("SITESTOSHOW")
Application("t-banner1") = rs("BANNER1")
Application("t-banner2") = rs("BANNER2")
Application("t-banner3") = rs("BANNER3")
Application("t-banner4") = rs("BANNER4")
Application("t-banner5") = rs("BANNER5")
Application("t-configloaded") = "yes"
configloaded = "yes"
Application.UnLock
set rs = nothing
end if

Then below that I define variables using the application variables, all dimmed of course.

but I'm experiencing the following flaw, the application variables arent getting re-loaded after I change things, and I'm sure I set Application("t-configloaded") = "no" in the file that changes them. Yet when I reload the page (I have response.expires = 0 and response.addHeader "pragma","no-cache" in the _top.asp) it still dosnt reload the variables.

Any Ideas?

---------------
Da_Stimulator has spoken

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 31 October 2001 :  04:24:15  Show Profile  Visit Kat's Homepage
Have you tried stopping and restarting the service on IIS?

KatsKorner
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 31 October 2001 :  04:47:56  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I dont have access to that kinda stuff

---------------
Da_Stimulator has spoken
Go to Top of Page

Kat
Advanced Member

United Kingdom
3065 Posts

Posted - 31 October 2001 :  06:42:42  Show Profile  Visit Kat's Homepage
Chances are that is what is causing it though. I don't know if there is a lot you can do short of talk to your host. Maybe someone else knows another way.

I do know that is what we have to do anytime we modify the application variables.

KatsKorner
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 31 October 2001 :  06:50:57  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
How long of a wait before the application variables get cleared from the server memory? (by restricting access to the pages that call the variables...)

The server is readyhosting, as far as I know there is no way to stop/restart IIS

---------------
Need Snitz installed professionally?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20593 Posts

Posted - 31 October 2001 :  06:51:30  Show Profile  Visit HuwR's Homepage
you could try using this command
Application.Contents.RemoveAll ()

But this does not work on all versions

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 31 October 2001 :  06:57:41  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
hmm, I just thought of somthing. I'm not quite sure how app variables work, but I'm assuming they are just placed in the memory via there given name... So using Huwrs method would reset all the app variables on the server, including my forum (and other websites?) or just the app variables set for that virtual directory?

---------------
-Da_Stimulator

Edited by - da_stimulator on 31 October 2001 14:44:33
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 31 October 2001 :  10:39:52  Show Profile
Application variables are shared by all of the web application.

If you make an explicit change to an application variable node, it should be immediately visible. If you need to clean out your application variables, use HuwR's code or restart the web.


======
Doug G
======
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07