I am new to ADO.Net and trying to use DataAdapter & DataSet.

I read the data from database table into dataset using DataAdapter.

Do I have to use the same DataAdapter object to update and commit the
changes made to DataSet?

I will appreciate any pointers to articles / documentations.

Regards,

Abdul

Re: DataAdapter and DataSet in Disconnected Mode by Mufaka

Mufaka
Wed Mar 05 23:20:31 CST 2008

A K wrote:
> I am new to ADO.Net and trying to use DataAdapter & DataSet.
>
> I read the data from database table into dataset using DataAdapter.
>
> Do I have to use the same DataAdapter object to update and commit the
> changes made to DataSet?
>
> I will appreciate any pointers to articles / documentations.
>
> Regards,
>
> Abdul
Yes, you should use the same DataAdapter.

Here's a link that describes the process:
http://msdn2.microsoft.com/en-us/library/y2ad8t9c(VS.71).aspx

Re: DataAdapter and DataSet in Disconnected Mode by Cowboy

Cowboy
Fri Mar 07 10:41:32 CST 2008

Do you have to? No.
Shoud you? It is easier in many instances.

Whether you use a single adapter or more than one, you still end up having
to account for concurrency. Dino Esposito wrote some excellent articles on
concurrency in ADO.NET, so a google search will help. If you are using
auto-generated stuff (for INSERT, UPDATE), you will have to set up identical
adapters, if you choose more than one; in this instance, a single adapter is
better.

The adapter is just a bridge between the DataSet and the database, so you
are free to build other bridges, if it makes sense. In most "single
application" scenarios, you are just creating extra work, but there are
cases where one app pulls and the other pushes. Can't think of one off hand,
but it is possible. In this instance, you will either have the adapter in
its own library (smart) or code two.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"A K" <abdul_n_khan@hotmail.com> wrote in message
news:95a040c1-3fd2-4aa2-8902-bb72c61036cf@u72g2000hsf.googlegroups.com...
>I am new to ADO.Net and trying to use DataAdapter & DataSet.
>
> I read the data from database table into dataset using DataAdapter.
>
> Do I have to use the same DataAdapter object to update and commit the
> changes made to DataSet?
>
> I will appreciate any pointers to articles / documentations.
>
> Regards,
>
> Abdul



Re: DataAdapter and DataSet in Disconnected Mode by FredExley

FredExley
Sat Mar 08 01:18:15 CST 2008


"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message
news:%237O5aIHgIHA.4376@TK2MSFTNGP05.phx.gbl...
> Do you have to? No.
> Shoud you? It is easier in many instances.
>
> Whether you use a single adapter or more than one, you still end up having to account for concurrency. Dino
> Esposito wrote some excellent articles on concurrency in ADO.NET, so a google search will help. If you are using
> auto-generated stuff (for INSERT, UPDATE), you will have to set up identical adapters, if you choose more than
> one; in this instance, a single adapter is better.
>
> The adapter is just a bridge between the DataSet and the database, so you are free to build other bridges, if it
> makes sense. In most "single application" scenarios, you are just creating extra work, but there are cases where
> one app pulls and the other pushes. Can't think of one off hand, but it is possible. In this instance, you will
> either have the adapter in its own library (smart) or code two.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> *************************************************
> | Think outside the box! |
> *************************************************
> "A K" <abdul_n_khan@hotmail.com> wrote in message
> news:95a040c1-3fd2-4aa2-8902-bb72c61036cf@u72g2000hsf.googlegroups.com...
>>I am new to ADO.Net and trying to use DataAdapter & DataSet.
>>
>> I read the data from database table into dataset using DataAdapter.
>>
>> Do I have to use the same DataAdapter object to update and commit the
>> changes made to DataSet?
>>
>> I will appreciate any pointers to articles / documentations.
>>
>> Regards,
>>
>> Abdul


http://www.knowdotnet.com/articles/datasetmerge.html