[CDBI] Re: Trouble writing non-character fields
[prev]
[thread]
[next]
[Date index for 2005/08/09]
>> I think you need to tweak the SQL. Take a look at
>> http://wiki.class-dbi.com/index.cgi?SettingDefaultValues
>
> Thanks, but in this case I'm not creating a new record but updating
> one. The set_sql() function looks to assume you're doing a SELECT.
I think you didn't look closely enough. Look for the text "If you wanted to
do something similar for UPDATEs, you would override the 'update' SQL".
> The standard 'update' method shows itself in the doc, but there's no
> indication of how to do
>
> if typeof thing-to-update == DATE
> {
> CAST %S as "date"
> }
> else
> {
> %s
> }
>
> inside the SQL ...
Class::DBI doesn't support that, out of the box, because that's
DBMS-specific. But I think you can override the SQL on a per-class basis as
that Wiki page suggests.
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi