>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.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao