Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / June 2004

Tip: Looking for answers? Try searching our database.

SELECT with JOIN on Data from XML File

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Galey - 21 Jun 2004 19:44 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.