[thelist] ASP/SQL Solution for Double Currency Web Site

Scott Dexter sgd at ti3.com
Wed Feb 21 20:02:28 CST 2001


> -----Original Message-----
> From: Michele Foster [mailto:michele at wordpro.on.ca]
> I don't have access to the global.asa file .. not that I know 

you'd lean on the global.asa if you want the values to be loaded
automagically when the site(server) is started. Global.asa is looked-for and
run in a couple instances: (1) when the web site is started (typically when
the machine is booted up), and (2) the first .asp request a client makes. So
it does get accessed a lot (once for each unique visitor, plus once for each
restart of the server). You don't /need/ it though =) ...

You can use the Application() collection wherever. What I do to check/set on
the fly (put this somewhere where it gets run before you actually use the
value, otherwise...)

<%
if isEmpty(Application("varExRate")) then
	Application.Lock
	Application("varExRate") = 0.7
	Application.Unlock
end if
%>

The .Lock and .Unlock are safeguards to prevent race conditions.

> access to the global.asa file(s) .. and be doing things a 
> different way,
> please let me know.  :)
> 

You should be able to have one, contact your ISP and make sure....

sgd
--
work: http://www.ti3.com/
non: http://thinksafely.org/





More information about the thelist mailing list