Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:11:36+00:00 2026-05-26T23:11:36+00:00

I am using ColdFusion 9.0.1 and SQL Server 2005. The column in my database

  • 0

I am using ColdFusion 9.0.1 and SQL Server 2005.

The column in my database is name Points. It is set up as numeric(6,1).

When I write a query in SQL Server Management Studio to drop in values like 1.2 or 5.5, the numbers store correctly. When I drop in 1.23 it rounds to 1.2. When I drop in 5.55, it rounds to 5.6. This is exactly what I expect.

UPDATE TableName
SET Points = 1.2

When I pass my values to the CFC and DO NOT use CFQUERYPARAM, I get the exact results as described above.

When I pass my values to the CFC uses CFQUERYPARAM, I do not get what I expect. When I drop in a number like 1.2 or 5.5, the value gets rounded to 1.0 or 6.0.

UPDATE TableName
SET Points = <cfqueryparam type="CF_SQL_DECIMAL" value="#Points#">

I have changed the CFSQLTYPE to CF_SQL_NUMERIC and CF_SQL_DECIMAL. Still, I cannot get the numbers to save correctly.

When I run the query below in my CFC, the number gets stored as 1.0.

UPDATE TableName
SET Points = <cfqueryparam type="CF_SQL_DECIMAL" value="1.23">

Can you help me figure out why this isn’t behaving as I expect it to?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:11:37+00:00Added an answer on May 26, 2026 at 11:11 pm

    You need to add the scale attribute to your cfqueryparam to let it know how many decimal places to send. Add scale="2" and you should be good to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ColdFusion to return a result set from a SQL database and turn
I am using SQL Server 2008 and ColdFusion 9.1.2. I have a query that
I'm using ColdFusion with Microsoft SQL Server 2005 and on occasion I get this
I am using SQL Server 2008 Enterprise. I am using Management Studio -> Jobs
I am working with ColdFusion 9 on a Windows Server, using MS SQL Server
I am saving a .doc file to a SQL Server database as varbinary(max) using
I have a .sql file that was created using the MS SQL Management Studio
I am using Coldfusion 8 which is connecting to SQL Server 2008, the problem
I am using SQL Server 2008 Enterprise. I want to add an identity column
I am using SQL Server 2008 Enterprise. I met with issue which says line

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.