Pages

Men

rh

4/14/2013

What’s difference between “DataSet” and “DataReader”

“DataSet” is a disconnected architecture.

“DataReader” has live connection while reading data.

 So if we want to cache data and pass to a different tier “DataSet” forms the best choice and it has decent XML    
 support.

When application needs to access data from more than one table “DataSet” forms the best choice.

If we need to move back while reading record’s , “datareader” does not support this functionality.

But one of the biggest drawbacks of DataSet is speed.As “DataSet” carry considerable overhead because of relations,multiple tables etc speed is slower than “DataReader”.

Always try to use “DataReader” whereever possible. , as it’s meant specially for speed performance.

1 comment :