Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Numeric data with decimal places getting rounded off

New Here ,
Feb 13, 2009 Feb 13, 2009
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.
TOPICS
Database access
792
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2009 Feb 15, 2009
LATEST
Have you tried cf_sql_float? I use that and cf_sql_integer exclusively for numeric values and have never had an issue.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources