wyrd Posted February 2, 2003 Posted February 2, 2003 Sorry if this has been discussed (I looked through the pages real quick and didn't see any topics on it), but here goes... Is there any place where I can read up on DataSets and DataReaders and the performance related between the two? I'm curious as to when it's best to use one over the other, or which situations it probably wouldn't matter. Some seem obvious, such as multiple clients using the same database over a network (DataSets) or you just want to quickly retrieve some records from a database where no updating etc is involved (DataReader). However there's that middle portion for small business type apps where you're only dealing with a few thousand records (and the client is on the same computer as the database). On top of all this, in ASP.NET DataSets are created in memory on the server, which opens a whole new can of worms on when to use which. Quote Gamer extraordinaire. Programmer wannabe.
melegant Posted February 2, 2003 Posted February 2, 2003 I purchased the ADO.NET book from Microsoft ISBN 0-7356-1423-7 and have found it to be an excellent resource, especially in the diff's between set's and readers. i have not yet found a REALLY good .com resource..i have found pages here and there. the book so far has been best. Quote
pirate Posted February 3, 2003 Posted February 3, 2003 anyways, a lot who prefered datareader to dataset. You may need to look over these links : [/url] I hope this what you're looking for ! Quote
*Experts* Nerseus Posted February 3, 2003 *Experts* Posted February 3, 2003 In addition to the resources above, I'll add that sometimes your task at hand will only allow you a DataSet or a DataReader. For instance, if you want to bind a datagrid you'll need a dataset. You could conceivably read in data through a datareader and populate some custom type, even a dataset built from the DataReader, but I would go with a DataSet. Also, if you want to databind and have simplified updates, you'll want a DataSet. A DataReader can only read in data - no updates. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
wyrd Posted February 3, 2003 Author Posted February 3, 2003 In VB6 it was usually considered a bad idea to be binding things all over the place because you didn't have to much control over it all. In VB.NET though, it seems like you're in complete control, although binding a DataSet takes a lot more work then it used to. As for DataSet vs DataReader, it seems like in ASP.NET it's DataReader all the way (unless forced to use a DataSet somehow). In a regular application (just a single db app on a single machine), if you're going to be doing updates and manipulation, it probably doesn't matter much unless you're doing lots of updates and what not or if you want to be binding stuff. For server/client the obvious choice seems to be DataSet. Just tossing out some thoughts here as I'm thinking to myself, so feel free to add your own if you think mine are flawed (they probably are, I'm only right 0.001% of the time). Feel free to slap me upside the head too. ;) Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.