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

Showing Answers 1 - 13 of 13 Answers

ch ravi sankar

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

  Was this answer useful?  Yes

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!

Geetha

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

  Was this answer useful?  Yes

preetamjain

  • Dec 22nd, 2006
 

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

  Was this answer useful?  Yes

Aditya

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

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions