Diff between Dataset and Datareader?

Showing Answers 1 - 5 of 5 Answers

uday

  • Aug 11th, 2005
 

Data Set is a connectionless service and Data reader is a connection oriented service

  Was this answer useful?  Yes

Rupesh krotha

  • Sep 23rd, 2005
 

Dataset is used to store the data, it contains collections of Datatable.

Datareader is used to connect to the database for retrieving data.

  Was this answer useful?  Yes

What is a DataReader?
A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time. The DataReader does support access to multiple result sets, but only one at a time and in the order retrieved. Just as in the original version of ADO, the data is no longer available through the DataReader once the connection to the data source is closed, which means a DataReader requires a connection to the database throughout its usage. Output parameters or return values are only available through the DataReader once the connection is closed.

What is a DataSet?
DataSet is the core of the ADO.NET disconnected architecture and is used to store data in a disconnected state.

  Was this answer useful?  Yes

gayathri

  • Mar 14th, 2006
 

Data Reader - Forward only where as Dataset - Can loop through datas

Data Reader - Connected Recordset where as DataSet - Disconnected Recordset

Data Reader - Less Memory Occupying where as DataSet - It occupies more memory

Data Reader - Only Single Table can be used where as Dataset - Datatable Concept allows data to be stored in multiple tables.

Data Reader - Read only where as DataSet - Can add/update/delete using the dataset

Data Reader - No relationship can be maintained where as DataSet - Relationship can be maintained.

Data Reader - No Xml Storage available where as DataSet - Can be stored as XML.

Mudduswamy

  • Dec 18th, 2006
 

The Dataset is an core of disconnected architecture.Disconnected architecture means once you have retriveed the data from the database the connect of the datasource is dropped.The disconnected data become very commonlyThe dataset for the disconnected data from the Dataset object.The DataReader is an readonly ,forward only stream from the database.While using the datareader can improve the application performance reduce the system overhead because only one buffer row at a time in memory.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions