Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete class for parent/child
Message
From
19/05/1998 14:49:08
 
 
To
18/05/1998 00:51:24
Janet Fernando
Computer Craft Corporation
Quezon, Philippines
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00098115
Message ID:
00100370
Views:
27
>>>>Does anyone have or know of a delete button class which will allow me to delete child records of the parent? I realized (rather late I'm afraid) that the delete button I'm using assumes I want to delete for the master alias, and pays no attention to the children.
>>>>
>>>>I made things complicated for myself in that I was trying to use the same set of buttons at the bottom of the form and have them apply to my master table when I was on Page 1 of a page frame, and the child table when I'm on Page 2. The other parts seem to be working, but the delete is really insufficient.
>>>>
>>>>On the other hand, who needs to delete anyway;)
>>>>
>>>>Thanks,
>>>>
>>>>Sylvia
>>>Have you try using referential integrity? It allows automatic deletion of your child table once your link up with the parent table.
>>
>>Janet -
>>Yes, I'm using RI. But the problem is that after I delete a child record, the next record is displayed, but it's not a child of the current parent, but of another parent.
>>Sylvia
>
>I guess the relationship between your parent and child has been broken. Are you using link master on your grid? Or you are using the traditional set up for relationships?

Janet -
I looked into this a little further to see exactly what the delete action was doing, and it just skips to the next record. So I'm either going to have to write something to tell it to see if the next record is a child of the parent or create a view to limit what is seen.
Sylvia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform