1 minute read

ADO.NET DataSets.

_Thomas Wagner has some_[_ interesting things to say about ADO.NET DataSets_](http://radio.weblogs.com/0101986/2002/12/01.html#a843)_. I recall there was a long and drawn out discussion on the DM DOTNET list about the performance of using DataReaders vs. DataSets, the end result of which was that Microsoft's admonishment to always use DataSets is bullshit. [_[_The .NET Guy_](http://dotnetguy.techieswithcats.com/)_]_ > >

Yes, this is a long running discussion, but I’m not convinced that this supposed Microsoft policy stands up to much scrutiny. I’ve been at an MSDN presentation at Microsoft’s UK base where we were told, “…but if you want to get data out quickly, don’t use a DataSet, always use a DataReader.”

Thomas Wagner says:

_Over and over and over I read that one ought to prefer a Dataset over a Datareader because of the cost of opening and closing a db connection when using a reader object. Can we make a mountain out of a molehill to promote our latest achievements please? Connections are pooled in most NET / SQL Server configs and therefore are faster to open and close. Has anyone mentioned that  fact whilst they demote the  Datareader? No!   Every other author espouses the party line that you should cache datasets whenever feasible and eschew Datareaders because of the cost of opening a connection. I can see on a daily basis how developers confuse the concept of inheriting datasets with traditional OO programming._ > >