GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  Ado.NET
Go To First  |  Previous Question  |  Next Question 
 Ado.NET  |  Question 13 of 31    Print  
What is the difference between data reader and data adapter.

  
Total Answers and Comments: 8 Last Update: September 18, 2008     Asked by: abi 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Madhukar Singh
 

DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type). Reader is best fit to show the Data (where no need to work on data)

DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand, UpdateCommand, DeleteCommand, SelectCommand), It supports to the disconnected Architecture of .NET show we can populate the records to the DataSet. where as Dataadapter is best fit to work on data.



Above answer was rated as good by the following members:
surendra_sahu786, babu.atcha
August 06, 2006 12:22:46   #1  
Achint Kishore        

RE: What is the difference between data reader and dat...
DataReader directly access the table and it is only used for reading the records from it whereas dataadapter used to maintain connection is always used with dataset as dataset is of disconnected-architecture in nature.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 11, 2006 01:59:28   #2  
Madhukar Singh        

RE: What is the difference between data reader and dat...

DateReader is an forward only and read only cursor type if you are accessing data through DataRead it shows the data on the web form/control but you can not perform the paging feature on that record(because it's forward only type). Reader is best fit to show the Data (where no need to work on data)

DataAdapter is not only connect with the Databse(through Command object) it provide four types of command (InsertCommand UpdateCommand DeleteCommand SelectCommand) It supports to the disconnected Architecture of .NET show we can populate the records to the DataSet. where as Dataadapter is best fit to work on data.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 15, 2006 11:28:10   #3  
sbehera02 Member Since: July 2006   Contribution: 18    

RE: What is the difference between data reader and dat...

Datareader is connected mode. and read and forward-only Data.

DataAdapter is Bridge between Database and DataSet.


 
Is this answer useful? Yes | No
August 06, 2007 14:22:15   #4  
Yasir_Aziz        

RE: What is the difference between data reader and dat...
Is there any comparison between the two?
I think Comparison between Data Reader and Data Set is more Logical.
Anyway

DataReader

Works in Connected Mode

Forward Only Read Only

DataAdapter

Works in Disconnected Mode

Both Side Movements Read/Write


 
Is this answer useful? Yes | No
September 07, 2007 03:38:04   #5  
Priestly George Varghese        

RE: What is the difference between data reader and dat...
Datareader is connection oriented it moves in the forward direction only it keeps single row at a time.

Dataadapter acts as a bridge between datasource and dataset and it is a multipurpose object ie we can insert update delete throught dataadapter

 
Is this answer useful? Yes | No
May 16, 2008 01:17:46   #6  
abhi.desai Member Since: May 2008   Contribution: 1    

RE: What is the difference between data reader and data adapter.
The DataSet consists of a collection of DataTable objects
that you can relate to each other with DataRelation
objects. A DataSet can read and write data and schema as
XML documents..The DataReader object is the ADO.NET
counterpart of the read-only forward-only default ADO
cursor

 
Is this answer useful? Yes | No
August 12, 2008 08:05:01   #7  
ag_amazine2u Member Since: August 2008   Contribution: 2    

RE: What is the difference between data reader and data adapter.
Data Reader: It reads the data only only one direction when there is no need to manipulate our data.



Data Adapter:- When we use four commands - Insert Delete Update and Select than this one is good..

 
Is this answer useful? Yes | No
September 17, 2008 23:28:58   #8  
kasam_as Member Since: September 2008   Contribution: 1    

RE: What is the difference between data reader and data adapter.
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...

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 becouse it is not possible to go back and read it again.

DataReader : it is a Connected 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 Datasouse.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape