If you have two tables in a DataSet and need to do a SELECT with a JOIN
between the two tables (or RIGHT OUTER JOIN in my case), how do you do that
if the data was read in from an XML file using DataSet1.ReadXML ?
Isn't the DataTable SELECT only for working with one table? And also, if
you use an sqlDataAdapter and an sqlCommand object to do it, doesn't that
require that you be connected to a database? From what I'm seeing, the
DataView also only works with one table.
I need to obtain the results of the following SELECT between two tables in a
dataset:
SELECT c.Name, c.Path, f.Path
FROM CTable c RIGHT OUTER JOIN FTable f ON c.Name = f.Name
WITH f.Path <> c.Path
but how can this be done without a connection to a database? Thanks.
William Ryan eMVP - 21 Jun 2004 20:17 GMT
You can use a DataRelation between the two datatables and navigate like
this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
connavigatingrelationshipbetweentwotables.asp

Signature
W.G. Ryan, eMVP
http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
> If you have two tables in a DataSet and need to do a SELECT with a JOIN
> between the two tables (or RIGHT OUTER JOIN in my case), how do you do that
[quoted text clipped - 13 lines]
>
> but how can this be done without a connection to a database? Thanks.
Val Mazur - 22 Jun 2004 03:29 GMT
Hi,
Check next example
http://support.microsoft.com/default.aspx?scid=kb;en-us;325688

Signature
Val Mazur
Microsoft MVP
> If you have two tables in a DataSet and need to do a SELECT with a JOIN
> between the two tables (or RIGHT OUTER JOIN in my case), how do you do
[quoted text clipped - 15 lines]
>
> but how can this be done without a connection to a database? Thanks.