Access to coresponding detail record in a Master-detail dataset

Access to coresponding detail record in a Master-detail dataset

Post by Ali » Wed, 09 Oct 2002 07:54:45



Hi,
I have a dataset including two tables which are defined
with a relation as a master-detail. I 'd like to know that
how can i access to coresponding detail records when i go
thro master records.
e.g. let say pointer is on the second record of the master
now i want to access to the details record for the same
master record(second master record).  

Please advice.

 
 
 

Access to coresponding detail record in a Master-detail dataset

Post by Rebecca Riorda » Thu, 10 Oct 2002 03:09:17


The DataRow object has a GetChildRows method that will return an array of
the rows in the detail table.  It has several signatures; online help has
details and examples.

HTH

--
Rebecca Riordan

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...


Quote:> Hi,
> I have a dataset including two tables which are defined
> with a relation as a master-detail. I 'd like to know that
> how can i access to coresponding detail records when i go
> thro master records.
> e.g. let say pointer is on the second record of the master
> now i want to access to the details record for the same
> master record(second master record).

> Please advice.