Hi,

I created a dataset that contains several datatables. I'd like to know how
to query data from these tables, like table join in sql?

thanks in advance

Re: How to reteive data amongst different datatable within a dataset by W

W
Thu Sep 01 15:22:16 CDT 2005

Use a different adapter for each table, filling each one separately and then
using a datarelation. http://www.knowdotnet.com/articles/datarelation.html
"Li Pang" <LiPang@discussions.microsoft.com> wrote in message
news:540079D8-A32B-40C8-8374-1F0B931F78D9@microsoft.com...
> Hi,
>
> I created a dataset that contains several datatables. I'd like to know how
> to query data from these tables, like table join in sql?
>
> thanks in advance



RE: How to reteive data amongst different datatable within a dataset by EltonW

EltonW
Thu Sep 01 16:03:02 CDT 2005

You can't join query from a dataset. You should get join query directly from
database.

HTH

Elton Wang

"Li Pang" wrote:

> Hi,
>
> I created a dataset that contains several datatables. I'd like to know how
> to query data from these tables, like table join in sql?
>
> thanks in advance

Re: How to reteive data amongst different datatable within a dataset by W

W
Fri Sep 02 09:59:43 CDT 2005

Elton - with all due respect, that's exactly the opposite of the way
adapters were designed. You can do a JOin on the databaase end fora Select
statement, but an Adapter or CommandBuilder can't fire updates to those
joined tables. For that, you should fill the tables separately (or use a
batch select statement if the db supports it, and use a datarelation object
to enforce the integrity constraints).
"Elton W" <EltonW@discussions.microsoft.com> wrote in message
news:FE1DA228-C0AA-466D-9C40-AAD7F2A11CA3@microsoft.com...
> You can't join query from a dataset. You should get join query directly
> from
> database.
>
> HTH
>
> Elton Wang
>
> "Li Pang" wrote:
>
>> Hi,
>>
>> I created a dataset that contains several datatables. I'd like to know
>> how
>> to query data from these tables, like table join in sql?
>>
>> thanks in advance



Re: How to reteive data amongst different datatable within a datas by EltonW

EltonW
Fri Sep 02 15:21:04 CDT 2005

Hi Ryan,

Yes you are right. We use 'join query' against database to fill dataset.
However, in my understanding, the original question is to 'join query'
against a dataset. I think that is impossible. If my understanding to the
original question is wrong, my answer is wrong.

Thanks for your point.

Elton Wang


"W.G. Ryan MVP" wrote:

> Elton - with all due respect, that's exactly the opposite of the way
> adapters were designed. You can do a JOin on the databaase end fora Select
> statement, but an Adapter or CommandBuilder can't fire updates to those
> joined tables. For that, you should fill the tables separately (or use a
> batch select statement if the db supports it, and use a datarelation object
> to enforce the integrity constraints).
> "Elton W" <EltonW@discussions.microsoft.com> wrote in message
> news:FE1DA228-C0AA-466D-9C40-AAD7F2A11CA3@microsoft.com...
> > You can't join query from a dataset. You should get join query directly
> > from
> > database.
> >
> > HTH
> >
> > Elton Wang
> >
> > "Li Pang" wrote:
> >
> >> Hi,
> >>
> >> I created a dataset that contains several datatables. I'd like to know
> >> how
> >> to query data from these tables, like table join in sql?
> >>
> >> thanks in advance
>
>
>