DataReader is connected object and one can process the rows that are returned by query, one at a time. It discards every row after you have gone through it and so it is extremely fast.It contains only read-only data, so no updates are allowed using DataReader objects.
In DataReader you can not get the no. of records directly from RecordSet.This is similar to VB 6, ForwardOnly RecordSet.
Meanwhile DataSet is disconnected object type.It uses XML to store data
Data reader is much faster then dataset if only selection query is their
Above answer was rated as good by the following members: kapilsanchihar
RE: What is the difference between data reader & data ...
DataReader is connected object and one can process the rows that are returned by query one at a time. It discards every row after you have gone through it and so it is extremely fast.It contains only read-only data so no updates are allowed using DataReader objects.
In DataReader you can not get the no. of records directly from RecordSet.This is similar to VB 6 ForwardOnly RecordSet.
Meanwhile DataSet is disconnected object type.It uses XML to store data
Data reader is much faster then dataset if only selection query is their
RE: What is the difference between data reader & data ...
Data reader: 1) Data Reader is a connected object 2) It contains read only data 3) No updates are allowed 4) It fetches only one record at a time 5) It handles the huge amount of data.
Dataset 1) Dataset is a disconnected object type 2) It fetches all data from the data source at a time 3) Modifications can be updated to the actual database 4) It will reduce the application performance.
RE: What is the difference between data reader & data set
data reader: 1.It uses the connected architecture. 2.It can be used as Read n forward only 3.Updations are not possible 4.It fectches only one record at a time. 5.It is faster compare to data set.
Data Set: 1.It uses disconnected architecture. 2.It can be used bidirectional n we can update database values by using data set. 3.It fetches all the data from data source at a time 4.It is Collection of more than one table. 5.It is slower
while performance data reader is faster than the data set because data set by default uses the xml scheams.
where to use data set and data reader:
1.if you want to just read the data and no transactions means better to use datareader only. 2.If you have more number of operations(update insert delete) and updations batch wise better go for data set.
RE: What is the difference between data reader & data set
Data Reader
This is Connection oriented and can read only one record at a time. It has got no capability of reading multiple tables at a time. This needs a live connection all the time.
Data Set
This is connection less and can read more than one table at a time. By making use of data set we can import the necessary tables from the database onto our client machine perform necessary modifications on the data and then commit to the server. As it is connectionless it saves server resources to a greater extent.