Difference between datareader and dataset?
Answer Posted / yasir a. mughal
 DataReader (Connection Oriented) is a forward only and
read only data while DataSet (Disconnected) is used to
maintain relationships between multiple tables.
 You can access one table at a time while it is define with
multiple tables.
 DataReader can't persists the data while DataSet can
persist the data
 DataReader operation is faster than DataSet operation.
 DataReader is connection oriented you can find the changes
in the database reflected in data reader immediately, where
as DataSet is pure disconnected one you will find the
changes only when you refresh the dataset using DataAdapter.
but conclusion....
Another often cited issue knows when to use DataReader as
opposed to DataSet objects. As a rule, if you don't need the
data once it has been read then uses a DataReader. The
DataReader offers a forward-only trip through data, whereas
DataSet allows you access to a group of data that may be
necessary to populate an ASP.NET Repeater or similar control.
Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
Explain About ado.net components/objects. Usage of data adapters and tell the steps to retrieve data.
What is ado.net connection?
Why do we use sqldataadapter?
What do you know about ADO.NET's objects and methods?
Do you use stored procedure in ado.net?
What is ado.net in vb net?
What is the return type of executescalar?
How to creating a SqlCommand Object?
What is difference between executenonquery and executequery?
What is Data Provider?
How do you connect to sql server database without using sqlclient?
Explain the difference between ado and ado.net?
Can datareader hold data from multiple tables?
Does sqlclient and oledb class share the same functionality?
What is the use of connection object in ado.net?