1,216
社区成员
发帖
与我相关
我的任务
分享
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