Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Ronald,
In those cases where I'll always delete all child records when a parent record is deleted, I've found the RI Builder to work fine and I haven't had to be concerned with additional error trapping (perhaps others have had a different experience). The RI code can be edited via the stored procedure editor on the Database menu pad. The code is pretty verbose.
If one needs a more granular approach, then one could write a trigger or procedure to handle the deletion of child records. I associate triggers with inserts and updates into auxillary tables that track some type of activity. While code to perform this type of operation can also fire at form or application via function/procedure calls instead of triggers, if data is being received from interfaces other than VFP forms (i.e. web browsers, PDAs, etc.), then the database container becomes common focal point of enforcement.
Hope this helps,
John
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement