Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate entry
Message
De
05/07/2011 09:01:03
 
 
À
05/07/2011 08:26:29
Muthu Vel
Sty Company
Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01517290
Message ID:
01517294
Vues:
46
>I have "student.dbf" with field 1.regno 2.applno 3. Name 4.course.
>How to prevent duplicate entry when i entering data entry? for example the applno "21005" is already exists in my table, by mistakenly again I enter same applno the message box tell record already exist, Do you want to continue is yes mean allow or if no means clear text boxes value.
>
> How to do this?

The easiest way is to not allow the user to enter the applno. Generate it automatically in your application.

If that's not possible (maybe because that number is printed on the application or something), you need to search in the table (using SEEK or LOCATE or SELECT) and show the message if you find the number. There are two places you can do this. You can either search in the Valid of the textbox where the number is entered, or you can wait until the user clicks Save and then do all the checks for that record, including this one.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform