Dim dt1 As DataTable = DataTables("GB")
Dim dt2 As DataTable = DataTables("SPCKB")
Dim dt3 As DataTable = DataTables("DBB")
dt3.DataRows.Clear
For Each dr As DataRow In dt1.Select("")
Dim filter As String = "SPDM = '" & dr("SPDM") & "' and GG1DM = '" & dr("GG1DM") & "' and GG2DM = '" & dr("GG2DM") &""
Dim fdr As DataRow = dt2.Find(filter)
If fdr Is Nothing Then
Dim ndr As DataRow = dt3.AddNew
ndr("SPDM") = dr("SPDM")
ndr("GG1DM") = dr("GG1DM")
ndr("GG2DM") = dr("GG2DM")
ndr("SL") = dr("SL")
End If
Next
这段代码哪里出了问题,就是对比表A和表B,然后显示在临时表C中
此主题相关图片如下:22.png