Copy link to clipboard
Copied
A ColdFusion program is trying to store a value or 0.25 into a column of type decimal(11,6) of SQL Server table but 0.0000000 is getting stored. 0.50 is getting stored at 1.0000000. This started happenning after using cfqueryparam. Maxlength is 17.
What am I doing wrong?
Without seeing your code, I would guess the CFQUERYPARM is using
cf_sql_integer instead of cf_sql_float.
Copy link to clipboard
Copied
Without seeing your code, I would guess the CFQUERYPARM is using
cf_sql_integer instead of cf_sql_float.
Copy link to clipboard
Copied
Was using cf_sql_decimal. Numeric didn't workeither but float did.
Why is this?
Thank you very much.
Copy link to clipboard
Copied
Because cf_sql_decimal needs the scale="" attribute set in order to use decimal places.