Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Master / Detail Tables through a DataSet : Rows.Count

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I have set up a DataSet and made a DataRelation between 2 tables (Master + Detail).

I now want to determine the number of Rows in both the 'Master' DataTable (as shown in the first grid) and the number of Rows in the the 'Detail' DataTable (as shown in the second grid).

When I do this I get the total number of Rows in the 'Detail' DataTable. This is not the number I want - I want to get the number of 'detail' rows that are associated with the current 'Master' data entry. That is if I have selected 'Master' record 1 then it tells me I have 2 associated details and if I select 'Master' record 4 then it tells me I have 0 associated details.

It currently shows me the total number of 'detail' records for all the 'master' records in my first DataTable.

How can I do this ?

Thanks in advance
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top