有一個dataset1其中有兩個datatable:table1 和table2 我想把其中table1的dataview的數據復制到另一個datas

呵,给你调试了一下,以前我也没这样用过。
Dim ds As New DataSet
Dim dv As DataView
dv = New DataView(objdsA.Tables(0), "班组ID>3", Nothing, DataViewRowState.CurrentRows)
ds.Tables.Add(objdsA.Tables(0).Clone) '复制表结构
Dim r As DataRowView
For Each r In dv
ds.Tables(0).Rows.Add(r.Row.ItemArray)
Next

Published At
Categories with Web编程
Tagged with
comments powered by Disqus