hi,
I have a dataset with 2 tables(Header and Detail)
I am using 10 adapters to fill the dataset(5 for Header and 5 for
detail).
All the adapters are having same columns(schema) as the tables in the
dataset.

While filling the dataset using the adapters one by one, i am not
getting the expected data. First adapter is filling the table with all
the data, second adapter is filling the table with two row(expected is
11 row) and so on..

but if i am filling the dataset table with only one adapter at a time
then i am getting the expected result.


i am adding the code wich i am using to fill the dataset.

thank you
Naison



dsDayBook.Clear();

daGVHeader.Fill (dsDayBook.Header);
daGVDetail.Fill (dsDayBook.Detail);

daPVHeader.Fill (dsDayBook.Header);
daPVDetail.Fill (dsDayBook.Detail);

daRVHeader.Fill (dsDayBook.Header);
daRVDetail.Fill (dsDayBook.Detail);

daPIHeader.Fill (dsDayBook.Header);
daPIDetail.Fill (dsDayBook.Detail);

daRIHeader.Fill (dsDayBook.Header);
daRIDetail.Fill (dsDayBook.Detail);

grid.DataSource = dsDayBook;
grid.DataBind() ;

Re: Filling a table using multiple adapters by Peter

Peter
Sat May 28 10:09:12 CDT 2005


<naisongarvasis@gmail.com> wrote in message
news:1117287610.452929.82940@g14g2000cwa.googlegroups.com...
> hi,
> I have a dataset with 2 tables(Header and Detail)
> I am using 10 adapters to fill the dataset(5 for Header and 5 for
> detail).
> All the adapters are having same columns(schema) as the tables in the
> dataset.
>
> While filling the dataset using the adapters one by one, i am not
> getting the expected data. First adapter is filling the table with all
> the data, second adapter is filling the table with two row(expected is
> 11 row) and so on..
>
> but if i am filling the dataset table with only one adapter at a time
> then i am getting the expected result.
>
>
> i am adding the code wich i am using to fill the dataset.
>
> thank you
> Naison
>
>
>
> dsDayBook.Clear();
>
> daGVHeader.Fill (dsDayBook.Header);
> daGVDetail.Fill (dsDayBook.Detail);
>
> daPVHeader.Fill (dsDayBook.Header);
> daPVDetail.Fill (dsDayBook.Detail);
>
> daRVHeader.Fill (dsDayBook.Header);
> daRVDetail.Fill (dsDayBook.Detail);
>
> daPIHeader.Fill (dsDayBook.Header);
> daPIDetail.Fill (dsDayBook.Detail);
>
> daRIHeader.Fill (dsDayBook.Header);
> daRIDetail.Fill (dsDayBook.Detail);
>
> grid.DataSource = dsDayBook;
> grid.DataBind() ;
>
Why do you need so many data adapters? I'm not trying to be a smart alec,
but I can't imagine the circumstances where so many are needed for the same
dataset.

--
Peter [MVP Visual Developer]
Jack of all trades, master of none.



Re: Filling a table using multiple adapters by Miha

Miha
Sat May 28 16:12:15 CDT 2005

Hi,

DataAdapter is smart enough to use DataTable's primary key.
So the overlapped records will appear only once.
Is this the answer?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

<naisongarvasis@gmail.com> wrote in message
news:1117287610.452929.82940@g14g2000cwa.googlegroups.com...
> hi,
> I have a dataset with 2 tables(Header and Detail)
> I am using 10 adapters to fill the dataset(5 for Header and 5 for
> detail).
> All the adapters are having same columns(schema) as the tables in the
> dataset.
>
> While filling the dataset using the adapters one by one, i am not
> getting the expected data. First adapter is filling the table with all
> the data, second adapter is filling the table with two row(expected is
> 11 row) and so on..
>
> but if i am filling the dataset table with only one adapter at a time
> then i am getting the expected result.
>
>
> i am adding the code wich i am using to fill the dataset.
>
> thank you
> Naison
>
>
>
> dsDayBook.Clear();
>
> daGVHeader.Fill (dsDayBook.Header);
> daGVDetail.Fill (dsDayBook.Detail);
>
> daPVHeader.Fill (dsDayBook.Header);
> daPVDetail.Fill (dsDayBook.Detail);
>
> daRVHeader.Fill (dsDayBook.Header);
> daRVDetail.Fill (dsDayBook.Detail);
>
> daPIHeader.Fill (dsDayBook.Header);
> daPIDetail.Fill (dsDayBook.Detail);
>
> daRIHeader.Fill (dsDayBook.Header);
> daRIDetail.Fill (dsDayBook.Detail);
>
> grid.DataSource = dsDayBook;
> grid.DataBind() ;
>