GeekInterview.com
Series: Subject: Topic:
Question: 154 of 348

What is use of DataAdapater? and is it possible to add data from data reader directly to a dataset or a datatable?

Asked by: Interview Candidate | Asked on: Oct 7th, 2006
Showing Answers 1 - 5 of 5 Answers
ch ravi sankar

Answered On : Oct 16th, 2006

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!!!

  
Login to rate this answer.
aloksaxena01

Answered On : Nov 9th, 2006

View all answers by aloksaxena01

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!

Yes  1 User has rated as useful.
  
Login to rate this answer.
Geetha

Answered On : Dec 21st, 2006

 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.

  
Login to rate this answer.
preetamjain

Answered On : Dec 22nd, 2006

View all answers by preetamjain

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...

  
Login to rate this answer.
Aditya

Answered On : Jan 4th, 2007

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.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.