By trent on 20 Nov in ColdFusion
Unfortunately I had to learn the hard way about the CF_SQL_DECIMAL option of cfqueryparam rounding my decimals off in SQL. I had used it for inserting, then after a while noticed my decimal places were being rounded (3.50 rounds to 4.00) in the database. Come to find out I needed to use CF_SQL_FLOAT instead.
Am I misunderstanding what a decimal is? Does anyone have a good explanation for this? I understand that CF_SQL_FLOAT is the “proper” option, but never thought there was much difference. If nothing else hopefully this helps someone or keeps them from making the same mistake, especially since money can be of type float :)