Answer:
Use SqlDataReader in the following conditions
•If you want to reduce the memory footprint of your application.
•Want to avoid the object creation overhead associated with the DataSet.
•Want to streamline and optimize your data access.
•Want to read row which contains BLOB (binary large object) columns.
•Wan to perform data binding with a control that support a data source which implement IEnumerable .
Use Dataset in the below condition
•Want in-memory relational view of the data for xml or non-xml manipulation.
•Want to retrieved data from multiple data source s like table,files or databases.
•Want to use the batch update facilities.
•Want to disconnected memory-resident cache of data.
•Wan to perform data binding with a control that support a data source which implement IList .
Source: MSDN | Asked In: Many Interviews |
Alert Moderator