如果是Vars变量:
For Each dr1 As DataRow in DataTables("表A").Select("某列 >" & Vars("cd"))
Dim dr2
As DataRow
= DataTables("表B").AddNew
For
Each dc
As DataCol
In DataTables("表B").DataCols
dr2(dc.Name)
= dr1(dc.Name)
Next
Next
如果是Public变量:
For Each dr1 As DataRow in DataTables("表A").Select("某列 >" & cd)
Dim dr2 As DataRow = DataTables("表B").AddNew
For Each dc As DataCol In DataTables("表B").DataCols
dr2(dc.Name) = dr1(dc.Name)
Next
Next