Home

Geeklog: What I Learnt Today / Adam

CF_SQL_DECIMAL in cf

> is a bit odd if you don't specify a scale it rounds your number to a whole number so 39.60 becomes 40

<cfqueryparam value = "39.60"
    CFSQLType = "CF_SQL_DECIMAL"
>
so you need to do this

<cfqueryparam value = "39.60"
    CFSQLType = "CF_SQL_DECIMAL"
scale="2"
>
and then you get 39.60 which is what you wanted

/ Adam