Question
Numeric data with decimal places getting rounded off
Hi There,
My application has been working fine with decimal values. Now, numeric value with decimals gets rounded off when I pass 70.24 and puts 70.00 in the database. The database column has a width numeric(5,2). I have found that coldfusion reference manual says we need to include "Scale" attribute to fix this by including scale = "2" in the cfqueryparam tag for CF_SQL_NUMERIC and CF_SQL_DECIMAL data types.
Do I need to include Scale at all places where I need to store decimals? How come it was working in the past without this scale attribute ? Can anybody provide me with your suggestions please?
Thanks in advance.
My application has been working fine with decimal values. Now, numeric value with decimals gets rounded off when I pass 70.24 and puts 70.00 in the database. The database column has a width numeric(5,2). I have found that coldfusion reference manual says we need to include "Scale" attribute to fix this by including scale = "2" in the cfqueryparam tag for CF_SQL_NUMERIC and CF_SQL_DECIMAL data types.
Do I need to include Scale at all places where I need to store decimals? How come it was working in the past without this scale attribute ? Can anybody provide me with your suggestions please?
Thanks in advance.
