Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RI works...and then it doesn't work
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01462399
Message ID:
01462401
Views:
39
>>I have two tables in a database that are linked with a persistent one-to-many relation.
>>
>>I have configured VFP referential integrity to restrict deletions from the parent table when matching records appear in the child table.
>>
>>I have a main-form that calls a sub-orm that includes code to delete records in that parent table. This code does an INDEXSEEK in the parent form to find the record to delete, and uses the VFP DELETE command to accomplish the delete.
>>
>>The first time the main form calls the sub-form, and the sub-form attempts to delete a record in the parent table, RI delete gets triggered, and the deletion does not occur, and control returns to the main form.
>>
>>If the main form then calls the sub-form again, and again tries to delete that same record in the parent table, RI delete does not get triggered, the record in the parent table gets deleted, and the related records in the child table are now orphaned.
>>
>>Thanks in advance for your help.
>>
>>Jim
>
>Did you try setting a breakpoint on tableupdate and also in the trigger's code?

Naomi,

Thanks for the suggestion. Nope haven't tried that yet. Will do, and let you know what happens.

Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform