Gareth (QLD CFUG mgr) and I identified this (dates as strings) as a
problem when developing a custom framework right back in CF6.1 days.

For my money, the only way to handle this is to strongly type all the
data as it moves from one layer to another (inc the DB), starting the
string to date conversion as soon as form data is read. LSDateFormat()
and other tools are part of a "form processing" layer before it gets
placed in it's first object/CFC. We thought of it as the opposite side
to formatting strongly typed data to strings for display (eg: decimals
as currency, etc).

The only downside to that is optional date values. This means picking
up an empty string from the form and replacing it with a sentinal
value (eg 1/1/0001) at the "form processing" layer with a
corrosponding piece of logic to convert that to a DBNULL.

IMHO the same holds true for numbers, especially decimals. That's one
of the many things I like Mark doing with Transfer - he thought of
this problem and tried to address it.

at least this is what my shattered mind can remember...

barry.b





uh oh. I can see a "CF needs NULL's" argument happening ... again ...

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaus...@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to