Hope this is the fastest:
Dim theTable as DataTable = theDataSet.Tables(0)
Dim secondTable As DataTable = theTable.Clone()
theTable.DefaultView.RowFilter = "SomeColumn=123" ' If integer
Dim oneRowView As DataRowView
For Each oneRowView In theTable.DefaultView
secondTable.ImportRow(oneRowView.Row)
Next
Dim newDataSet as DataSet = new DataSet
newDataSet.Tables.Add(secondTable)
"Danny Ni" <dn*@yahoo.com> wrote in message
news:OC**************@tk2msftngp13.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!