For Each dr As DataRow In dt.DataRows
'填充数据
If DataTables("R03_payable_Detail").sqlFind("customerCode= '" & dr("供应商代码") & "' and kind = '" & dr("类型") & "' and factoryID = '" & dr("工费单号") & "' and ID = '" & dr("系统单号") & "'And number = '" & dr("单内序号") & "' And c And c And c and smartID<>'" & smartID & "'") Is Nothing And DataTables("应付副表本地表").Find("customerCode= '" & dr("供应商代码") & "' and kind = '" & dr("类型") & "' and ID = '" & dr("系统单号") & "'And number = '" & dr("单内序号") & "' And c And c And c ") Is Nothing Then
'MessageBox.Show("单据有变动'" & dr("系统单号") & "''" & dr("类型") & "'")
Dim nr As DataRow = DataTables("应付副表本地表").AddNew()
For i As Integer = 0 To sCols.Length - 1
nr(dCols(i)) = dr(sCols(i))
Next
End If
Next
老师,上述代码如何优化速度
dt表和R03_payable_Detail、应付副表本地表,是不是在同一个数据库的,如果不是,没有优化的余地