Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tracing Record was added
Message
 
To
20/12/1999 15:39:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00305990
Message ID:
00306428
Views:
24
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform