Flex 3 / Coldfusion 8 数字问题

发布于 2024-08-05 16:13:31 字数 266 浏览 2 评论 0原文

我们最近从 Coldfusion 7 迁移到 Coldfusion 8。我们的一个报告 Flex 应用程序获取 cfc 查询的返回结果,并在该 ArrayCollection 中添加一列。它在 Coldfusion 7 上工作,但现在在 Coldfusion 8 中,它将该列视为字符串而不是数字,这会导致负值出现 NaN 错误。它在数据库中是一个 numeric(12,2) NOT NULL。当我将其转换为数字(var)时,它在 Flex 中工作,但我不想在我们所有的项目中这样做......有人遇到过这个问题吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不咬妳我踢妳 2024-08-12 16:13:31

事实上我们昨天也刚刚看到了这一点。 CF 7 和 CF 8 是唯一的区别。这样做不起作用:

var num:Number = e.result.MYNUMBERFIELD as Number;

但这确实有效:

var num:Number = Number(e.result.MYNUMBERFIELD);

我不认为你的循环和制作 csv 是相关的。我认为这是一个纯粹的CF8问题。我会查看错误库,看看是否注意到类似的事情。我们还没有时间进一步研究它。我也对这两种强制转换方法之间的区别感兴趣。

更新 2009-09-24:

在至少一台本地计算机上,ColdFusion 8.0.1 的累积修补程序 3 已修复此问题。您可以在此处获取此修补程序: http://kb2.adobe.com/cps/511 /cpsid_51180.html。该页面还包含必要时安装修补程序的说明。

其他查看此问题的人请注意:Adobe 建议您仅在遇到该页面上列出的一个或多个问题时才将 CHF3 应用于 ColdFusion 8.0.1。如果您在这个问题上遇到问题,那当然是指您。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文