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

Which property is used to check whether a DataReader is closed or opened?

807


How can we perform transactions in .net?

792


What is Data Provider?

801


What is a data control clerk?

783


What are the different execute methods of Ado.Net?

749


Which object needs to be closed?

1995


How do you connect to sql server database without using sqlclient?

785


What is serialization and de-serialization in .net? How can we serialize the dataset object?

721


What is the executescalar method?

791


What is the difference between DataReader and DataSet in ADO.NET?

832


What is isolation?

769


Define different execute methods of ADO.NET command object ?

765


How can we add/remove row's in "datatable" object of "dataset"?

780


What are ado.net objects?

729


Explain the difference between data reader and data set?

696