Thanks Jay.
JoinView may help me out, though, when I look at the code, I'm not sure how
exactly it populates each row in its row list with the columns from the
different tables. Perhaps I need to understand better what
DataSet.Relations do (do you know a good article which describes that?).
Since DataSets are billed as a sort of "in memory database", I was hoping
there might be some way to simply set a DataSet as the Data Source for a
select statement (similar to the way you set a physical database as the Data
Source), and then do selects on the tables in the DataSet. I'd like to do
something like the following:
// myDataSet contains tables t1 and t2
SqlConnection myConnection = new SqlConnection(DataSource=myDataSet);
string mySqlStatement = "select t1.firstName, t1.lastName, t2.institution
from t1, t2 where t1.personID = t2.personID"
SqlDataAdapter myAdapter = new SqlDataAdapter(mySqlStatement, myConnection);
myAdapter.fill(myDataSet, "NewTable");
Obviously the precise code above won't work, but is there any way to do
something like this?
Thanks very much,
Dan