Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about mechanics of calling a trigger
Message
From
12/02/2002 10:23:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Question about mechanics of calling a trigger
Miscellaneous
Thread ID:
00618827
Message ID:
00618827
Views:
44
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
Next
Reply
Map
View

Click here to load this message in the networking platform