Home All Groups Group Topic Archive Search About

Updating two table through data adapter.

Author
20 Apr 2006 12:22 PM
trialproduct2004
Hi all,

I am having one confusion regarding working of data adapter.

What i am doing is i am having one stored procedure which is returing
me data from two different table.

Then i am collecting data from this sp into dataset using dataadapter.

What i am doing is updating both table of dataset.

Here my problems start. What i want to do it to stored changes which i
made in dataset into database.

But dataadapter stored only changes which i made in first table and not
of second table.

What should i do to store changes of second table of dataset into
database.

As it is given that after making changes to dataset we can reflect
those changes to database which is not happening in my case.

Can someone tell me what i am doing wrong. Please correct my concept if
i am wrong.

Please provide me proper solution to store changes made in dataset
containing two table into database.

Thanks in advance.

Author
20 Apr 2006 4:29 PM
William (Bill) Vaughn
The DataAdapter (like the TableAdapter) is designed to provide easy updating
of one (and only one) table. That said you can trap the Update events and
execute your own UPDATE/INSERT/DELETE SQL as needed--but you'll have to
generate the code for that yourself.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

<trialproduct2***@yahoo.com> wrote in message
Show quote
news:1145535736.774097.235110@j33g2000cwa.googlegroups.com...
> Hi all,
>
> I am having one confusion regarding working of data adapter.
>
> What i am doing is i am having one stored procedure which is returing
> me data from two different table.
>
> Then i am collecting data from this sp into dataset using dataadapter.
>
> What i am doing is updating both table of dataset.
>
> Here my problems start. What i want to do it to stored changes which i
> made in dataset into database.
>
> But dataadapter stored only changes which i made in first table and not
> of second table.
>
> What should i do to store changes of second table of dataset into
> database.
>
> As it is given that after making changes to dataset we can reflect
> those changes to database which is not happening in my case.
>
> Can someone tell me what i am doing wrong. Please correct my concept if
> i am wrong.
>
> Please provide me proper solution to store changes made in dataset
> containing two table into database.
>
> Thanks in advance.
>

AddThis Social Bookmark Button