Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggers with VFP DBC??
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00477440
Message ID:
00477496
Views:
23
>Do many of you use triggers to set the values of you primary keys? I am reworking a large vfp app using native vfp tables and dbc and to set the values of the primary key field I was thinking of using triggers as to not have to go through every line of code and work around all of the inserts and append blanks.
>
>Any thoughts on the upside / downside of this?
>
>Thanks in advance...
>Tommy

Tommy,
As Craig posted, you have to use the DefaultValue property of the field. You can't use triggers because VFP will not allow triggers to change records in the table that initiated the trigger. VFP does this to eliminate recursive triggers.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform