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:23:19
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Question about mechanics of calling a trigger
Divers
Thread ID:
00618827
Message ID:
00618827
Vues:
45
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform