GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET
Go To First  |  Previous Question  |  Next Question 
 ASP.NET  |  Question 87 of 164    Print  
What is use of DataAdapater? and is it possible to add data from data reader directly to a dataset or a datatable?

  
Total Answers and Comments: 5 Last Update: January 04, 2007     Asked by: Nikhil 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 16, 2006 09:55:22   #1  
ch ravi sankar        

RE: What is use of DataAdapater? and is it possible to...

data adapter is to fetch data into datasets

u cannot use datareader to populate a dataset only the data adapter can do.

datareader is only for forward only read.

happy coding!!!


 
Is this answer useful? Yes | No
November 09, 2006 03:18:47   #2  
aloksaxena01 Member Since: November 2006   Contribution: 7    

RE: What is use of DataAdapater? and is it possible to...
Mr shankar is quite right to say this. Bute here I want to elaborate the answer .Dataset is used in disconnected mode only is major feature of ADO.NET.Dataadpater is a bridge to collect the data from server and keep itslef and afterward move data to dataset. Fill() method is used to transfer data from dataadapter to dataset And Datatable is taken birth from dataset only. if dataset is not then datattable is not in movie.Datareader is used in connection mode and working for retreieve data ready only mode and itcan't be move back becuase its main feature is forward only.Good Luck!
 
Is this answer useful? Yes | No
December 21, 2006 10:49:46   #3  
Geetha        

RE: What is use of DataAdapater? and is it possible to...

DataAdapters purpose is to perform database queries and create dataTables containing the query results. Its also capable of writing changes made to the datataTables back to the database.

DataAdapter acts as a go-between providing a layer of abstraction between DataSet and the Physical Data sorce.


 
Is this answer useful? Yes | No
December 22, 2006 07:17:43   #4  
preetamjain Member Since: December 2006   Contribution: 3    

RE: What is use of DataAdapater? and is it possible to...
Data Adapter is link between Data base and Dataset without data Adapter we can not bind data in to dataset ... so we use data Adapter which interact with database and fill dataset Easily ...we can also use data Adapter to insert Delete and Update record in database by using only one Select query...
 
Is this answer useful? Yes | No
January 04, 2007 08:14:59   #5  
Aditya        

RE: What is use of DataAdapater? and is it possible to...
Yes In asp.net 2005 it is possible to populate a datatable from a datareader. You have to use Load method of datatable and pass the datareader as argument.
 
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