Hope this is the fastest:
Dim theTable as DataTable = theDataSet.Tabl es(0)
Dim secondTable As DataTable = theTable.Clone( )
theTable.Defaul tView.RowFilter = "SomeColumn=123 " ' If integer
Dim oneRowView As DataRowView
For Each oneRowView In theTable.Defaul tView
secondTable.Imp ortRow(oneRowVi ew.Row)
Next
Dim newDataSet as DataSet = new DataSet
newDataSet.Tabl es.Add(secondTa ble)
"Danny Ni" <dn*@yahoo.co m> wrote in message
news:OC******** ******@tk2msftn gp13.phx.gbl...
Hi,
I would like to know the fastest way to clone a dataset with filter
inVB.Net
or C#. Say I have a dataset that has one datatable having several data
rows.
I want to clone the structure to another dataset but with selection of
datarows.
Please Help!