What is the difference between DataSet and DataReader?
[top] A DataSet object is a collection of DataTable objects and includes information about relationships between the tables. A DataSet object is used to select data from tables or to create views and access child rows. In addition, DataSet provides you with rich features like saving data to XML files and loading data from XML files. DataReader is an object that is used to iterate a result set from a query; it reads one row at a time. If you want forward-only access to the results, the DataReader object is the best option because it is the most efficient method in this scenario. Also, DataSet is used for a disconnected case while the DataReader needs to keep connection to a database. Related link: DataReader and DataSet 1.