Counting child rows

  • Thread starter Thread starter Travis Scott
  • Start date Start date
T

Travis Scott

Hi all,

I want to find out if a child table in a relation has any rows before
deleting the parent record. I have a 'clients' table and a 'advertisements'
table with a relation to the clients table in one dataset. I'm having
trouble finding the property to check if there are any child rows for the
currently displayed client. Any ideas?

TIA
Travis
 
Hi Travis,

Here you go:
r.GetChildRows(dataSet1.Relations[0]).Length

where r is your master row, and dataSet1.Relations[0] is relation between
master and child table.
 
Back
Top