User Id :    Password :      New Member   Forgot Password  
Topic: What is the difference bewteen accessing the data through the dataset and datareader
Anamika singh
20 Oct 2010 at 02:58 AM
What is the difference bewteen accessing the data through the dataset and datareader?
Re: What is the difference bewteen accessing the data through the dataset and datareader
Gaurav
22 Oct 2010 at 10:52 PM

Data Reader: It take the data sequentially from the command object and requies the connection should be open while it is getting data.

Data Adapter: It fetch all the required data from database and pass it to DataSet.

DataSet: It get all the required data from Data Adapter. It contains data in the form of Data Table.

DataSet : it is a disconnected Articeture...

Disconnected Architecture : It is followed by Dataset. In this once the data has been read by Dataset from SqlDataAdapter we can close the connection to database and retirve the data from Dataset where ever we want. Dataset hold the data in the form of table and do not interact with Datasource.

DataReader : it is a Connected Articeture...

Connected Architecture : Means that while SqlDataReader reads the data from database and also reading data from SqlDataReader to any variable the connection to database should be open. Also once you read some data from SqlDataReader you should save them because it is not possible to go back and read it again.

Total Replies: 1
 
Featured Text Ad

Featured Ad