This works well. Thanks
What I don't understand is from all my research on the net, most of the samples to achieve that make use of custom functions to add the values one by one into a container, such as a collection, but only for those not already found in the collection. This would be extremely slow considering that for most of the situations I will use it that I will have between 500 and 3000 rows. Your example was among a few I found which make use of the ToTable() approach. Hi, glad it worked.
VS2003 did not have this capability, so most people had to write the custom code that you saw. The custom code would still run fairly fast (I had to do it in VS2003 for lists that were greater than 3,000 rows, and it ran very quickly).
But obviously, the overload for ToTable() is much better. And yes, many people, even those who are using VS2005 heavily, aren't aware of it.
In my articles in CoDe magazine and my CodeCamp/usergroup presentations on what's new in ADO.NET 2.0, I have stressed this functionality very hard. Ironically, with more and more talk about VS2007, many are still in catch-up mode on what's new in VS2005.
Kevin