Hi Bruce,
>I am still new to VFP programming.
>It appears that to add a record to a database via a form, you APPEND BLANK and then have the user enter the new data.
>I did not see any controls that would generate an error message if you tried to enter a duplicate key as happens with BTrieve and other databases.
This behavior, in my experience, shouldn't even be touchecd by your forms, but all handled by the database. In order to prevent multiple key, create an index on an integer asn set it as primary. This will be your primary key, your users should not even know this field exists. The way this mantians its uniquness is handled by the DEFAULT VALUE option in the table designer. For a better understanding check your VFP Solutions Samples, and under Database or something. You should find the ID field example.
Précédent
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