What is the difference between a Dataset and DataReader?
Can dataReader hold data from multiple tables?
Answers were Sorted based on User's Feedback
Answer / karna
data set a collection of datatables and we can edit the
data in the datatables and the same can be persisted to
databae using adapter in the disconnected maner by using
commandbuilder or insert,update,select command.
datareader is just the container for data,its readonly and
forwardonly curosr.this follows connected architecture,that
means when we are reading data from datareader at that time
connection should be kept open.
data reader can hold data from multiple tables and
datareader can hold more than one table.
string query="select * from employee;select * from student";
sqlcommand cmd=new sqlcommand(query,connection);
if anybody have any doubts,mail to me on email@example.com
|Is This Answer Correct ?||14 Yes||5 No|
Answer / naresh
1. It is a read only and forward only data access to data.
2. You can access one table at time.
3. It can't persist the data.
4. It is comes under connected architecture.
5. One of the most advantage is it is much faster than Data
1. It can access multiple tables at a time.
2. It can persist the data.
3. It is a relational data cache hosted in application
domain during execution.
4. It is a disconnected architecture.
5. It can't define with out data adapter.
Yes.dataReader hold data from multiple tables. The SELECT
statement may have columns that belong to one or more
"tables in the database". By example using a JOIN
or something similar.
|Is This Answer Correct ?||1 Yes||2 No|
Answer / sandyni
DataSet is a disconnected object and holds the data from
datastore. It can hold the data of more than one table.
where as dataReader is connected architecture which can
rbe used to read the data from the dataset in forward only
fashion. DataReader cannot hold multiple tables of data.
|Is This Answer Correct ?||1 Yes||3 No|
How do you merge two datasets into the third dataset in a simple manner?
How we can provide data to ado.net?
What provider ADO.net use by default ?
Where is adodb dll located?
What are the benefits of using ado.net?
What is a datagridview?
can u tell me the why ADO does not support xml..
What's the difference between Dataset.clone and Dataset.copy?
what is execute scalar?
What is a control toolbox?
What is the difference between ado.net and oledb?
what is the criteria of selection in sbi interview?