Databinding for datasets (more than one table)

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

Guest

Is it possible to bind to a datagrid the result of a select with several
tables?
With one table, I have :

mySel = "Select statement";
...
DA.Fill(DSAtt, "intemp");
DataGridAttendance.DataSource = DSAtt.Tables["intemp"];
DataGridAttendance.DataBind();

but, if my Select has two tables and each row of the datagrid has values
from both tables, how do I modify the above code?
Thanks,
VM
 
Hi,

In the select statement you can join more than one table like:
select table1.* , table2.* from table1, table2 where table1.ID =
table2.T1_ID

The result table will be accesible when you use DataAccess.Fill method , if
this is not what you are looking for, please be more especific.

Cheers.
 
Back
Top