Follow in Twitter & Facebook


Like in Facebook

Powered By Blogger Widgets

Free Download

FREE Tools


Thursday, March 22, 2012

Dataset and Datareader asp.net

Introduction:
Dataset and DataReader are very much important in Ado.Net in Asp.Net. So it is necessary to know what is the difference between dataset and datareader and where to use both. Also you can consider as an interview question in asp.net interviews. You can also check ExecuteScalar(),ExecuteNonquery(),ExecuteReader() in Asp.Net.

Description:
Datareader:
(1)-It is a readonly and forward only data i.e Read-Only acess.
(2)-U can acess one table at a time .
(3)-It comes under connected architecture.
(4)-One of the most advantage is that it is much faster than dataadopter.
(5)-Using Datareader only one value can be acessed at a time from the database.
(6)-Here the data is retrieved based on the select statement .
(7)-We can't do DML operations through datareader.

Dataset:
(1)-It is defined with multiple tables.
(2)-It is a disconnected architecture.
(3)-It can't be defined without DataAdopter.
(4)-Dataset is able to fetch record in bidirection.
(5)-Datas having read/write acess.
(6)-It comes under dissconnected architecture.
(7)-It is slower as compired to datareader.




0 on: "Dataset and Datareader asp.net"