| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 556 人关注过本帖
标题:计算问题!
只看楼主 加入收藏
hshuguobin
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2007-6-10
结帖率:100%
收藏
 问题点数:0 回复次数:1 
计算问题!
rs1.open "select * from ICZrdEntry where FPeriod=" & dqdatey & " and FNum=" & rs!Fnum & "", cn,adOpenKeyset, adLockPessimistic
                If rs1.RecordCount <> 0 Then
                    rs1.MoveFirst
                    Do Until rs1.EOF
                        If rs2.state <> adStateClosed Then
                            rs2.close
                        End If
                        rs2.CursorLocation = adUseClient
                        rs2.open "select * from ICBal where Fperiod=" & dqdatey & " and FstockID=" & rs!FStockID & " and FitemID='" & rs1!FitemID & "'", cn, adOpenKeyset, adLockPessimistic
                        If rs2.RecordCount <> 0 Then                        
                                rs2.Fields(6) = rs2.Fields(6)- rs1!FQty  
                        '字段属性全是双精度型,运行到这名句时,如果rs2.Fields(6)=1.36,rs1!FQty =1.36,计算结 果应该是0,可数据库里显示的是"-6.66133814775094E-16",百思不得其解,望高手指教!

                        end if
                         rs2.Update
                        rs1.MoveNext
                    Loop
                End If
搜索更多相关主题的帖子: where 
2008-03-17 18:36
hshuguobin
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2007-6-10
收藏
得分:0 
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
2008-03-17 22:12
快速回复:计算问题!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.032378 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved