Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RI works...and then it doesn't work
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01462399
Message ID:
01462400
Vues:
42
>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?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform