Adrian
Thu May 26 09:32:31 CDT 2005
You might be interested in the assembly I've been working on at
http://www.queryadataset.com. Besides INNER JOINS, it lets you perform
complex SQL SELECT statements including UNION, OUTER JOINS, GROUP BY,
HAVING, ORDER BY, sub-queries, etc against the tables in a dataset.
DataSet ds; //contains your DataTables from different sources
DataView dv = QueryADataSet.DsCommand.Execute("SELECT t1.col1, t2.col2 FROM
table1 t1 join table2 t2 on t1.key=t2.key", ds);
It sure saves having to write a lot of DataRelation, GetChildRow and
GetParentRows code. Its the piece of technology Microsoft left out of
ADO.NET.
The web-site allows you to upload your own XML data fragment, DataSet or
resultset and issue queries using the QueryADataSet assembly. If the query
returns the results you expect, then this assembly might be what you are
looking for. Note the result of any query from this assembly is a standard
DataView object; perfect for presentation.
Hope this helps
Ad.
"Jim Heavey" <JimHeavey@discussions.microsoft.com> wrote in message
news:F425CACD-FA34-43BD-AB95-4763A73DB75C@microsoft.com...
>I have data from two different databases which I want to join together.
>If
> I create one Datatable with the results of one query and another Datatable
> with the results of the second query, can I somehow join the 2 Datatables
> to
> produce a result which will look like I had executed a single query to
> return
> a single datatable?