Databinding for datasets (more than one table)

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
 
I

Ignacio Machin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top