Query between tables In Dataset .NET - TechRepublic
General discussion
September 16, 2005 at 02:56 AM
pramodsahu_4nov

Query between tables In Dataset .NET

by pramodsahu_4nov . Updated 18 years ago

I have a Query related to Dataset & DataTable in ASP.NET/VB.NET

1) MyDataset is a dataset populated from Two diffrent XML file.
2) Dataset having two tables table(0) is ResourceAllocation, And table(1) is Projects
3) Table(?Project?) is a master table containing all the projects of company some fields are ProjectID,ProjectName,Dureation,Status
4) Table(?ResourceAllocation?) is a table in which we are maitaning the employess working on the project some fields are ProjectID,Resource Name,Startdate etc

Now I want to show the output in Datagrid from both table like in RDBMS

Select A.ProjectName, B.ResourceName, B.StartDate
From Project A, ResourceAllocation B
WHERE A.ProjectID = B.ProjecrtID
AND A.Status = ?Opened?

OUTPUT WILL BE
ProjectName ResourceName StartDate

I made a relation between Both Table on ProjectID, Select statement is applicable on a single table only.
I don?t want to display record by GetChildRows method, it?s a limited flexibility.

So how can I access record from both table & Apply WHERE clause on fields of both tables in a single Select statement.

This discussion is locked

All Comments