Information générale
Catégorie:
Codage, syntaxe et commandes
>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
If you put NEWID() as the default value of your cust_id field it will fire every time you append a record.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement