Difference between datareader and dataset?

Answer Posted / ravinderreddy kothakapu

Dataset:
1)Dataset is a inmemory database for client application
process and it will contain more number of tables.
2)Dataset supports manipulations.
3)Dataset is a independent component in ADO.NET.
4)Dataset is a purly disconnected architecture with XML file
integration.XML file integration supports cross platform
independence.
5)Dataset supports bidirectional navigation.
6)Dataset defined multiple tables where contraints can be
applied.
7)Dataset can be persist the data.
Syntax: DataSet ds=new DataSet();

Data Reader:
1)Data Reader is a read only and forward only implimentation
2)Read only means it cannot support
manipulations(insert,delete, update)
3)Forward only means it support record pointer navigation in
forward direction means it is used for only once read
4) we can access only one table
5)Data reader cannot persist the data
6)It is a connected Architecture.
7)Most advantage is Data Reader is faster then Data Adapter.

Syntax:OleDb DataReader dr;
dr=cmd.ExcuteRader()

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is typed dataset ?

916


What is execute scalar in ado.net?

732


How can I retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is it possible to get 2 tables of data at a time?

754


What are the 3 major types of connection objects in ado.net?

784


What is the current version of entity framework?

707


What is Data view?

810


How to pass multiple tables in datasets simultaneously?

835


Is ado.net dead?

792


What are the important features of ado.net 2.0?

847


How can we load multiple tables in a dataset?

819


Which is faster sqldataadapter and sqldatareader?

728


Why edit is not possible in repeater?

734


What is difference between executenonquery and executequery?

739


How to check if the Dataset has records ?

775


How to create data relations?

773