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

Scott Dexter sgd at ti3.com
Wed Feb 21 19:21:13 CST 2001


 
> varCDNPrice = rst("Price")
> varExRate = 0.7
> varUSPrice = (varCDNPrice * varExRate)
> 
> Is the above reasonable?  Or am I better off having BOTH prices in my

yes, reasonable, until you have some products that have specific US prices
that are not subject to conversion (is there such a thing?). I'd say leave
the dynamic conversion to US$.

> I'm wondering if I should actually be storing my "varExRate" 
> in my database?

nah, store it in an Application() variable. Its what they're there for. If
you want to pull it out of the db initially to load it, cool (we do that
sort of thing here at work; the global.asa Application_OnStart loads up a
number of things, some from db, some from .ini files).

You can create a 3 line ASP page to change it when you have to (instead of
stopping and starting the application to get the global.asa's
Application_OnStart fired) --

<%
Application.Lock
Application("USExRate") = 0.7
Application.Unlock
%>

Then change your references from hard-coded to the Application var and yer
done =)
sgd




More information about the thelist mailing list