计算问题!
rs1.open "select * from ICZrdEntry where FPeriod=" & dqdatey & " and FNum=" & rs!Fnum & "", cn,adOpenKeyset, adLockPessimisticIf 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