Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about mechanics of calling a trigger
Message
De
12/02/2002 10:35:27
 
 
À
12/02/2002 10:23:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00618827
Message ID:
00618835
Vues:
9
If you use SQL Server table triggers, you don't 'activate' them. They automatically run.

You could as well, trap this situation in the save method business object and update the values accordingly.

>Howdy...
>
>I'm sure this will seem really silly, but I honestly don't understand the mechanics of the following...
>
>I have a SQL Server Database and a VFP front-end. Let's say I have a table called MYTABLE, and a user may wish to change a reason code. I want to automatically set fields in MYTABLE called LASTUPDATE and LASTUSER when the reason code (or anything else) changes. I know this is what triggers are for...in this case, LASTUPDATE and LASTUSER get set when MYTABLE is touched...but I'm not sure how I 'activate' the trigger [if I'm even asking this correctly] such that when I do an UPDATE on a reason code, the trigger automatically fires.
>
>In other words, I know how to write all the code, but don't understand how to call it [is it two pass-through calls or just one?], keeping in mind that there may be 10 other types of updates to this file that will require calling the trigger to set LASTUPDATE and LASTUSER.
>
>Thanks,
>Kevin
Thanks,
Dan Jurden
djurden@outlook.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform