ADO.net 2.0, beta 2, how to get data from 2 tables, not parent-chi

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

in ADO.net 2.0 beta 2
I know how to do the parent-child type.
1. drag a DataGrid control in a window form, get a datasource from
table cust.
2. drag table cust onto the DataGrid.
3. in the data window, right-click the dataset, select configure..
adding table o.
4. drag the child table onto the DataGrid control.
comment: With this way, I build this without a coding. I believe it is
MVC style.
I do not know the steps to join two relational tables into one ADO
table.Please advise. Thanks.
Peter
 
Peter,

If it is a one to one relation you can use the merge.

Be aware that the keys have to be equal and that the collecting table has to
have all columns you need (probably is the best to do two merges in a new
created datatable).

(I don't think that you can do this with drag and drop)

Here a simple sample that can lead you in my opinion to your solution.

http://www.windowsformsdatagridhelp.com/default.aspx?ID=edb1409d-5394-468f-a63f-de3a5d92b14a

I hope this helps,

Cor
 
Back
Top