Note: - This is my best question and we expect everyone to answer it. It is asked almost 99% in all companies....Basic very Basic cram it.
Following are the major differences between “Dataset” and “Data Reader”: -
• “Dataset” is a disconnected architecture, while “Data Reader” has live connection while reading data. 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 records, “data reader” does not support this functionality.
• However, one of the biggest drawbacks of Dataset is speed. As “Dataset” carry considerable overhead because of relations, multiple table’s etc speed is slower than “Data Reader”. Always try to use “Data Reader” wherever possible, as it is meant especially for speed performance.
Asked In: Many Interviews |