>I am having trouble understanding just when VFP updates a key field.
>
>Example: I have a customer.dbf with a CustID field. The CustID field is an integer field and it is the primary key field.
>
>In both \SAMPLES\SOLUTIONS and
> \SAMPLES\TASTRADE
>there are stored proceedures called "NewID()".
>
>I undestand the code in "NewID(). What I do not understand is just when is the code called.
>
>Since "NewID() is a stored proceedure, is it called automatically when an APPEND BLANK and UPDATE are done?
>
>Or, if I have a toolbar button named "update", do I put the call to "NewID() there?
>
>Ultimately, I quess my question is this.Just because a function is stored as a store proceedure, is it called any differently than any other function?
>
>Rob
It could be part of trigger. Open table and check table property to see what triggers are in use and what functions they fire. But firstly you could also try to "Find for all objects" this procedure name in snippets.
Edward Pikman
Independent Consultant