>>but if I remember correctly the currency data type only accepts 2 decimal 
 >>places.

I know, and my form only supplies 2 decimal places. Java adds all these 
decimals, due to floating approximation errors.
And it does not explain whay there is an error with 57.49 and not with 57.50.
Anyway, I changed the column fron Curency to floating value and the proble 
still persists.

 >>IMHO, I would not employ the use of a cfinsert tag.

This is what I've been dooing in about 15 years of CF programing.
IMO the worst problem with CFINSERT or CFUPDATE is that you have to supply the 
list of all form fields, a PITA.
But I designed my own CF_INSERT tag that creates this list by comparing the 
form fields and column names in the table and call CFINSERT.

 >>Although it makes inserts simpler, it removes the programmers ability to 
 >>define the field data type expected and perform data type validation using 
 >>the cfqueryparam

The query generated by CFINSERT does use CFQUERYPARAM, the problem seems to be 
elsewhere.
Apparently the string representing the float value with 2 decimals is first 
converted into internal float representation, then back to string in the SQL 
query with an incorrect format.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357024
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to