Role of Data Adapter in ADO.NET??

A

atif

Hi all

I have read 5-6 books just to find what is the job of Adaptor object in
ADO.NET. Non of them clearly defines the job, all of them says that it
is used to get data from datasource, then what is the job of Command
object??

Here is what i know, very simple and prime responsibilities

Connection = Link with Data Source
Command = To run the queries(all types of queries) and stored
procedures
DataSet and DataReader = To store the local copy of data (i know the
difference b/w DataSet and DataReader)

What is the prime responsibility/role of Data Adapter class in ADO.NET
??
 
C

Cor Ligthert [MVP]

What is the prime responsibility/role of Data Adapter class in ADO.NET

Interact with data which has on the Net program part side the format
dataset, datatable, datarow (the last only for update insert and create) and
which is retrievable by using SQL statements.

Beside that it has some overloaded functions.

I hope this helps,

Cor
 
A

atif

Thanks for the Reply
But, i couldn't got it clearly

In ADO 6.0, there are three classes Connection, Command and Recordset
Without any one of these, you can't avail all
manupulating-features(select, update,delete, execution of SPs and
Functions) of the DBMS, apart from formatting something or minimizing
development effort( like Delete command can directly be executed by
Connection rather than Command)

Now, in ADO.NET, there are three classes too, Connection, Command and
say Recordset(DataSet + DataReader)
I have seen an example of filling DataSet through DataAdapter

Can i avail all manupulating-features through these classes or Data
Adapter is required for any one of above-listed actions ??

Please clear this thing or atleast give any link/book name which
clearly defines functions of these classes
(Thanks) ^ (Thanks)
 
C

Cor Ligthert [MVP]

Atif,

You make the standard exceptions, which are wrong.

A Recordset can be compared the most with a DataTable.

A datatable is a disconnected recordset, which can be used wrapped inside a
dataset or standalone. A dataset can holds more datatables and the relations
between them.

A DataAdapter is a class, with what you can read data from a database and
put it in a dataset or a datatable. The dataadapter is as well the medium to
update/delete/inserts DataSets, DataTables, DataRows. There is one
overloaded function in the dataadapter to convert from a recordset to a
dataset (in fact one datatable inside a dataset)

Beside that you have a lot of instructions to do database actions using SQL.

As last there is as well a datareader that can read row by row from a
Database.

Just a short explanation I cannot write an AdoNEt book here.

However it is much more than what you could do with classic Ado, therefore
it is better not to compare and absolute better not to use names that are
related to that. It gives only misunderstandings.

I hope this gives a slight idee?

Cor
 
A

atif

Thanks Cor, it was helpful
Please name any good book/or any source for .NET which would elaborate
What not How
Thanks again
 
C

Cor Ligthert [MVP]

Atif,

The most known writers in the dotnet newsgroups for AdoNet are David Sceppa
and Bill Vaughn.

Just search in Google on their names and "AdoNet books".

I did not read their books.

However they are both more or less active in the newsgroup ADONET.

Seeing there answer in that newsgroup, than I expect that Davids book
fullfils the most your question about "What".

However the last is just a gues.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top