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

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


> 
> and for small instances, such as a modest ceramics web site, certainly
> practical
> 
> but that's dangerous thinking on a large scale

well, it depends on what we're scaling ;)

Staying in context, we're storing a scalar value. Yes, we're still leaning
on the client app to do the business logic (and as much as I lean on SQL to
do my job for me I just didn't think of your sexy join), but in the search
of a central place to easily manage (edit) and quickly retrieve, the
Application scope collection has its advantages. Would I store the scalar
directly? No, I'd keep the value in the db (in its own table) so it is even
more central and available, and load up the Application var at startup.

> 
> for instance, if there are any non-web processes that have to 

oh don't play "what if" with me, old man ;)

> 
> ... with the general result that the process logic of 
> calculating a rate is
> replicated into every damn piece of programming ever written, 

what you bring up here is the natural flow into n-tier architecture, so even
your sexy SQL won't fit ;p  --We'd place it into a business object (COM,
CORBA, etc) and let it handle things there ...

In other words, yeah, let the SQL Server do it, I agree. But we can be
sneaky and do both: Load the entire recordset (Select Stuff, Price,
Stuff*Price as 'USPrice' from ceramics, USExchangeRate) into the Application
variable. --And we could even do it as an ADO Recordset object, but that
would require some global.asa tweaks, and we don't know if Michele has
access to it. The other way to get it into the Application variable is to
use the ADO Recordset .GetRows() to get the values into a multidimenioned
array, and then we can peruse that storage when we need prices, and leave
your precious database alone to run backups or choke on its transaction log
or something. --And while we're at it, let's just go ahead and use ADO 2.5
and store it in XML, so all the other non-web processes can use it too =p

sgd




More information about the thelist mailing list