In which conditions usage of SqlDataReader is better than Dataset and vice-versa ?
Interview question and answer by: Rajkatie
| Posted on: 7/3/2012 | Category: ADO.NET Interview questions
| Views: 923 | | Points: 40
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 .
MSDN | Asked In:
| Alert Moderator
Found interesting? Add this to: