以前的一个老系统最近处问题,总是不保留小数点,但是
我调试却是可以保存,是在不知道是怎么回事,就是下列代码,
程序其实想实现batch_list和batch_list_temp一样的数值,小数点后6位,
用户运行的时候会出现batch_list中的值把小数都舍弃的情况,百思不得其解啊,
然后我用同样数据走一遍程序,却又带小数点了。
            strSql = "select * from batch_list_temp where bl_lot_id = '" & tBill.sLotid & "' and bl_db = '" & tBill.sDB & "'"
            Set oListTemp = New ADODB.Recordset 
            oListTemp.Open strSql, con, adOpenStatic
            Dim cn As New ADODB.Connection
            cn.Open con.ConnectionString
            Do While oListTemp.EOF = False
                Set aInRS = New ADODB.Recordset
                strSql = "select * from batch_list where bl_lot_id = '" & tBill.sLotid & "' and bl_db = '" & tBill.sDB & "' and bl_kind = '" & TurnNull(oListTemp("bl_Kind")) & "'"
                aInRS.Open strSql, cn, adOpenKeyset, adLockPessimistic
                If aInRS.EOF = True Then aInRS.AddNew
                aInRS("bl_lot_id") = tBill.sLotid
                aInRS("bl_Kind") = TurnNull(oListTemp("bl_Kind"))
                aInRS("bl_AVG") = Val(TurnNull(oListTemp("bl_AVG")))
                aInRS("bl_Max") = Val(TurnNull(oListTemp("bl_Max")))
                aInRS("bl_Min") = Val(TurnNull(oListTemp("bl_Min")))
                aInRS("bl_stdDev") = Val(TurnNull(oListTemp("bl_stdDev")))
                aInRS("bl_db") = tBill.sDB
                aInRS.Update
                Set aInRS = Nothing
                oListTemp.MoveNext
            Loop