Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referential integrity not working
Message
From
31/12/1998 23:17:45
 
 
To
29/12/1998 10:23:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00171159
Message ID:
00172041
Views:
47
Hi Marc,
Try this
Run gendbc against that database and see if the code generated for Child1 and child2 is the same as for problem_child.
I have been thru this nightmare once and am not sure now exactly what fixed it but I did discover along the way that deleting an index and recreating it causes the dbc to drop the RI stuff.
Also I find that every time that I go back an re read the programmers reference manual on this subject, there is something that I had forgotten.

>Hi all...
>
>Using VFP 5.0a on WinNT 4.0 sp3, I am having a problem with referential integrity of my database not working properly.
>
>My db consists of a parent table (parent) and three child tables (child1, child2, child3). Each parent - child relationship is a one to one relationship using the same candidate index field (myKey). The myKey field in each table is the same type and length (character, 20).
>
>I have referential integrity set up so when a record is deleted in the parent table that any related records in the child tables are deleted also (cascaded). On two of the child tables, this works fine. However, on one of them (child1) (perhaps I should call it 'problemChild1') is doesn't work. The record in child1 which corresponds to parent is not marked for deletion.
>
>BTW, the Referential Integrity Builder dialogue box does show that all three parent-child relationships are set to 'cascade' for 'rules for deleting.'
>
>What could cause this? I've tried reseting all the referential integrity rules to 'ignore', saving it, going back and changing to 'cascade,' but no change. I've tried deleting the index in child1 and recreating it, but also no change.
>
>I've looking in MS Dev Net, but nothing there. I suppose if I have to, I could change my app so that when I delete a parent record, I delete the child record, but I think I'd rather have the dbms handle this.
>
>Thanks in advance,
>Marc Mandel
Previous
Reply
Map
View

Click here to load this message in the networking platform