Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for duplicates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00315645
Message ID:
00315693
Vues:
20
>This seems line an elementary question, but it's got me a bit puzzled. When the user is entering a new record, how do you check to be sure a field doesn't have a duplicate value without moving the record pointer? This also would have to take into account buffering. It seems as though I've done this before, but my head is in a bit of a muddle today and it's not coming to me.

Use good ol' SQL

* put the value into a var
nPOID = po.id

SELECT id FROM po WHERE id = nPOId INTO CURSOR cDuplicates
IF _TALLY > 0
=messagebox("Duplicate PO ID!... Flee the building!"
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform