Answer to the question, "Whether to use the DataReader or DataSet?" really depends upon performance. If we want high performance and going to access the data once, then the DataReader is suitable. If we need access to the same data multiple times, or if you need to create a complex relationship in memory, then DataSet is appropriate.
Using DataReader can increase application performance and reduce system overheads because only one buffered row at a time is ever in memory. With DataReader we get as close to the raw data as possible and donÆt have to go through the overheads of populating a DataSet object, which sometimes may be expensive if the DataSet contains a lot of data.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.