Hi
is there any way to create a dataview from two different
datatables.

My purpose is to display a datagrid. some columns from one
table and some other columns from other table.

i am using commandbuilder for automatic query. so i am not
able to join query from datasource.

Thanks in advance.

Regards

H. Mahadevan

Re: How to create dataview from two datatables by Manoj

Manoj
Wed Jan 07 00:49:01 CST 2004

By definition, a dataview is a kind of a filtered view of the underlying
DataTable. A commandbuilder basically can generate command objects for
insert, delete and update operations. How are u using a command builder for
query? Pls detail. Is it not feasible to create Views in the DB in your
case? Why not just change the select command of the DataAdapter used to pick
data from the view and then bind the filled dataset. If so, that would be
the most elegant solution. Else it would be painful to synthesize a new
DataTable out of two datatables.

--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet

"H.Mahadevan" <hariharanmahadev@hotmail.com> wrote in message
news:280901c3d4e6$fb00dc10$3101280a@phx.gbl...
> Hi
> is there any way to create a dataview from two different
> datatables.
>
> My purpose is to display a datagrid. some columns from one
> table and some other columns from other table.
>
> i am using commandbuilder for automatic query. so i am not
> able to join query from datasource.
>
> Thanks in advance.
>
> Regards
>
> H. Mahadevan



Re: How to create dataview from two datatables by Miha

Miha
Wed Jan 07 04:03:55 CST 2004

Hi,

You might find this article interesting:
HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;326080&Product=vcSnet

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"H.Mahadevan" <hariharanmahadev@hotmail.com> wrote in message
news:280901c3d4e6$fb00dc10$3101280a@phx.gbl...
> Hi
> is there any way to create a dataview from two different
> datatables.
>
> My purpose is to display a datagrid. some columns from one
> table and some other columns from other table.
>
> i am using commandbuilder for automatic query. so i am not
> able to join query from datasource.
>
> Thanks in advance.
>
> Regards
>
> H. Mahadevan