>You could try something in Linq. e.g:DataSet1.TableA.Where(x=>x.Name=="Fred").ToList().ForEach(x => DataSet2.TableA.ImportRow(x));
So, this got me thinking. I had written a blog post a few months ago about benchmarking DataTable Selects vs LINQ Selects. If I recall, LINQ wasn't really performant for some queries when it was first introduced and I wanted to re-visit that. It turns out that LINQ was much faster (
http://geek-goddess-bonnie.blogspot.com/2011/04/linq-with-datasets.html). In that post, I said I'd write more later on other DataSet vs LINQ benchmark comparisons, but never got around to it.
So, I thought I'd try and benchmark the DataSet CopyToTable from my earlier suggestion to Bill, vs the above LINQ statement that Viv posted that does the same thing. LINQ was more than 1.5 times faster (against a Typed DataSet ... haven't yet benchmarked against a regular DataSet). As in the example in my blog post, I was using a DataSet containing 270,000 rows and copying 30,000 rows. I haven't written a new blog post yet, but I will in the next couple of days.
~~Bonnie