Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for duplicate keys when entering data in form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00252239
Message ID:
00252269
Vues:
10
>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.
>Under FoxPro 2.6 you can either go to EOF and SCATTER MEMVAR and not add the record if it is already present.


To enforce unique keys, you can use a primary or a candidate index. To check for uniqueness before you try to commit the record, you can INDEXSEEK() the value of the current field to check to see if it exists in the table already.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform