Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tracing Record was added
Message
 
À
20/12/1999 15:39:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00305990
Message ID:
00306428
Vues:
23
>>You cannot use the INSERT and UPDATE triggers to record a datetime stamp on a record. It will cause an error if you try to change anything on the table that the trigger is firing for from within the trigger.
>
>You can change other tables though, right? Isn't this is how FoxAudit works, triggers, audit table, ect. I've never used it myself.

Yes, you can change other tables. You have to or else there would be no way to do a cascading deleted.

The interesting thing is that the restriction has nothing to do with the triggers themselves, but rahter the order in which things are checked during a save.

The trigger is the last thing to be checked. Before it the uniqueness of primary and candidate indexes have been checked and all field and record level validation rules have been called. These things have to be done first or else there is no guarantee that the record will pass muster and get saved and so no reason to run the trigger. If the trigger was to allow a change to the table it was called for then all of the other checks would need to be done again.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform