We recently migrated from coldfusion 7 to coldfusion 8. One of our reporting flex apps takes the returned results of a cfc query and adds up a column in that ArrayCollection. It worked on coldfusion 7, but now, in coldfusion 8, it sees that column as a string instead of a number, which is causing NaN errors on negative values. Its a numeric(12,2) NOT NULL in the database. It works in Flex when I cast it as a Number(var) but I'd hate to do that in all of our projects... has anyone ran into this problem?
We actually just saw this yesterday too. CF 7 and CF 8 was the only difference. Doing this does not work:
var num:Number = e.result.MYNUMBERFIELD as Number;
but this does:
var num:Number = Number(e.result.MYNUMBERFIELD);
I don't think your looping and making a csv is related. I think it is a pure CF8 issue. I'll look in the bugbase and see if I notice anything like this. We haven't had time to research it further yet. I am also interested in what the difference is between those two cast methods.
Update 2009-09-24:
On at least one one machine here locally, the Cumulative Hot Fix 3 for ColdFusion 8.0.1 has fixed this issue. You can get this hotfix here: http://kb2.adobe.com/cps/511/cpsid_51180.html. That page also has instructions for installing the hotfix if necessary.
Note for anyone else looking at this question: Adobe recommends that you apply CHF3 to ColdFusion 8.0.1 only if you are experiencing one or more of the issues that are listed on that page. If you are having the issue in this question of course that means you.