Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Triggers, stored procedures
I want to recreate a VFP database in SQL Server 7.0
In FoxPro, you can define a relationship between two tables and have FoxPro automatically generate stored procedures for insert, update, and delete.
For Updating the parent key field, there are Cascade, Restrict, Ignore options.
For Deleting the parent record, there are Cascade, Restrict, Ignore options.
For Inserting a Child record, there are Restrict, Ignore options.
Deleting a parent is not problem, I can make a trigger to delete all related children when a parent is deleted (cascade)(this gives strange result codes back to VFP, though). I can make a trigger to disallow deletion of a parent when there are children present (restrict).
Inserting a child is not a problem, I can disallow a new child with no parent, but I don't know how to cascade parent key changes to children when it is more than 1 parent record being changed.
This is not a situation that happens often, but we are keeping the VFP database for offline use and it might become important if something terrible happens and we have to fix things.
Any help would be appreciated.
Suivant
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