By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

Databinding for datasets (more than one table)

P: n/a
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

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

<VM> wrote in message news:e2**************@TK2MSFTNGP12.phx.gbl...
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

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.