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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top