K
Klas Mellbourn
I have the following datamodel (implemented in SQL Server)
header -< detail
That is, I have two tables, "header" and "detail". There is a foreign key
from detail to header so that for each header there can be many details.
I have created a corresponding (strongly typed) dataset, with the two tables
and the relationship. (To be perfectly clear: one dataset containing two
tables)
Now, due to programmatic and performance reasons, I would like to populate
BOTH the tables in the dataset with a SINGLE sql select statement
(containing a join and further conditions). That is, I would like to
populate both tables using a single select statement similar to this:
SELECT Header.*, Detail.*
FROM Header INNER JOIN
Detail ON Header.ID = Detail.ID
WHERE (Detail.Foo > 52)
Is this possible using ADO.NET (or DAL for that matter)? How?
Thanks,
Klas Mellbourn
header -< detail
That is, I have two tables, "header" and "detail". There is a foreign key
from detail to header so that for each header there can be many details.
I have created a corresponding (strongly typed) dataset, with the two tables
and the relationship. (To be perfectly clear: one dataset containing two
tables)
Now, due to programmatic and performance reasons, I would like to populate
BOTH the tables in the dataset with a SINGLE sql select statement
(containing a join and further conditions). That is, I would like to
populate both tables using a single select statement similar to this:
SELECT Header.*, Detail.*
FROM Header INNER JOIN
Detail ON Header.ID = Detail.ID
WHERE (Detail.Foo > 52)
Is this possible using ADO.NET (or DAL for that matter)? How?
Thanks,
Klas Mellbourn