Child Relationship

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

If I create a Foreign Key relationship between a field in 2 tables, does
this now allow me to use parent/child relationships?
 
I loaded about 5 tables where there are definitely parent/child
relationship, but if I iterate over the dataset and print the
ChildRelationship.Count and ParentRelationship.Count, all counts are 0.

I know that I have built the foreign keys as I have gotten a number of
Foreign key violation exceptions in my testing.

So what am I missing?

Or to put it another way, for any particular record, which is a primary key
field in one table and a foreign key in another and I am attempting to
delete the primary key, what process would I use to find these related
records. I know that I could create views for the respective tables and if
I find no records, then I could delete the primary key. But I am guessing
there is a better way..

Thanks in advance for your assistance!!!!!!!!!!
 
Back
Top