Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger Question
Message
De
21/12/1999 20:30:47
 
 
À
21/12/1999 19:28:30
Frank Mundo
WindowDressers, Inc.
Maine, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00307030
Message ID:
00307050
Vues:
19
>I had code in the Delete trigger for a table. It was a simple IIF() that returned true or false. I then set up my cascading deletes and it added "__ri_delete_main().and." to the code I had there before. Now I can't delete anything. Either side works alone but together I receive a "delete trigger error".
>Help.
>Also, is there a way to set and regenerate the RI code from within a program? Some customers have .dbc files without the cascading deletes set and we would like to send out a utility that would set up the cascading deletes and regenerate the code.
>Thanks.

Hmm... that's weird... but, your your iif() is going to cause a roolback then the trigger should probably be...

iif(yourexpressionhere,.t.,.f.) and _ri_delete_main()

This would be evaluated from left to right... But, it also sounds like what you are doing would be better as a table RULE... A rule is fired before the save, and if it fails, there is no save... a Trigger is fired after the save... so, generally, you want triggers to be things that won't stop your save, but will just react to it.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform