Interviews Questions and Answers

2

Like

What is the different between dataset and datareader?


Posted by: Michael
On 23 Sep 2011 | Views: 991 | Categories: ADO.NET
Interview Answers(1)

 On 26 Sep 2011 09:16:10 AM
DataSet is a disconnected architecture and DataReader has live connection while reading the data. If we want to cache data and pass to a different tier DataSet forms the best choice and it has good XML support.

Dataset is a best option for accessing data from multiple tables.
Datareader can not move back, it supports forward only and read only.
DataSet is slower than datareader, because of relations, multiple tables etc.

We should use DataReader wherever possible, as it’s meant specially for speed performance.

Post your Answers

 

Other lins

.Net Techies
Other lins