这个意思?……
For Each dr As DataRow In dt1.DataRows
Dim dt2 As DataTable
Dim cmd2 As New SQLCommand
cmd2.C
cmd2.CommandText = "Select * F rom {Fa_Gz} Where PQID = "'" & CInt(dr("鼎邦制单数ID")) &"' And Art_No = " & CInt(dr("工序号")) & " and zano = '" & CInt(dr("箱号")) & "'
dt2 = cmd2.ExecuteReader(True)
If dt2.DataRows.Count = 0
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = cmd.CommandText & " INSERT INTO Fa_Gz (实际生产员工, indate,Num,扫码人,Art_No,订单号,indatetwo,PQID,manno,monmoney) VALUES (dr(实际生产员工), dr(扫码时间),dr(件数),dr(扫码人),dr(工序号),dr(箱号),dr(订单号),dr(扫码时间),dr(鼎邦制单数ID),dr(实际生产员工工号),dr(基本工价),br("基本工价")*br("工价系数")*br("件数"))
cmd.ExecuteNonQuery
End If
Next
……