假设表A为关联主表,表B为关联子表,将关联子表中对就的数据复制到表C中,代码大概是这样吧
Dim drs As List(Of DataRow) = Tables("表A").Current.DataRow.GetChildRows("表B")For Each dr As DataRow In drs Dim r As Row = Tables("表C").AddNew For Each cl As col In Tables("表B").Cols r(cl.Name) = dr(cl.Name) NextNext
其实方法有很多,供参考