Re: Rounding, why?

2012-11-13 Thread Leigh
You need to provide the scale attribute (ie Number of decimal places). The default is zero (0). That is why the value is rounded. -Leigh ~| Order the Adobe Coldfusion Anthology now!

Rounding, why?

2012-11-12 Thread Greg Morphis
Something is baffling me.. I'm inserting a value into the database and it's rounding the number. I don't know where or why this is happening! On the action page this is what the code looks like when inserting INSERT INTO mytable

Re: Rounding, why?

2012-11-12 Thread Greg Morphis
removing the cfqueryparam cfqueryparam value=#arguments.payment.getamount_paid()# CFSQLType=cf_sql_decimal null=#not len(arguments.payment.getamount_paid())# /, works.. just having #arguments.payment.getamount_paid()# causes it to work fine.. 35.52 is saved as 35.52 in the database. Any ideas as

Re: Rounding, why?

2012-11-12 Thread Greg Morphis
Aha, Google is my friend.. when using cf_sql_decimal you must specify the scale parameter.. scale=2 / makes it all work.. now to go through and make sure everywhere else I'm using the cf_sql_decimal I'm providing the scale parameter. On Mon, Nov 12, 2012 at 11:28 AM, Greg Morphis

Re: Rounding, why?

2012-11-12 Thread Greg Morphis
I tried decimal(19,2) and back to smallmoney and still 36.00 gets inserted into the database table. And changed the type in the cfc to cf_sql_decimal. On Mon, Nov 12, 2012 at 10:56 AM, Greg Morphis gmorp...@gmail.com wrote: Something is baffling me.. I'm inserting a value into the database