[thelist] cleaning Db for output
Kevin Raleigh
krr at ix.netcom.com
Tue Dec 4 22:37:44 CST 2001
> When pulling data from a database with ASP, make sure you trim()
> all your data as it comes out of the database.
>
> e.g.
>
> varFieldOne = Trim(objRS("FieldOne"))
>
> You save yourself from debugging hell when the data does not come
> out "clean" from the DB.
okay, i appreciate that this is a "defensive programming" strategy, and in
that sense it's good advice, but sheesh, the time to do the trimming, in
fact the time to do *all* edits to ensure clean data, is on **input**
if you do it on output you'll have redundant code all over the friggin
place
Following this thread I was wondering if I could put some type of script
together to clean any possible mistakes up so that I would be able to
aviod having to code in this fashion?
> varFieldOne = Trim(objRS("FieldOne"))
I am just learning here so if my question runs into some more than I
realize...
any insight appreciated
thank you
Kevin
More information about the thelist
mailing list