Dim nma() As String = {"A1","A2","A3"} '学生基本信息表数据来源列
Dim nmb() As String = {"B1","B2","B3"} '奖助表数据接收列
Dim dr As DataRow = DataTables("奖助表").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = DataTables("学生基本信息").DataRow(nma(i))
Next
如果是所有列都复制,代码如下:
Dim
dr
As
DataRow = DataTables("奖助表").AddNew
For
Each
dc
As
DataCol
In
DataTables("奖助表").DataCols
dr(dc.Name) = DataTables("学生基本信息").DataRow(dc.Name)
Next