Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to exclude duplicates
Message
De
10/04/1998 01:10:40
 
 
À
09/04/1998 10:40:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00090768
Message ID:
00090981
Vues:
19
>>I want to check for duplicates before I commit a new record.
>>
>>My form uses bound text boxes and the 'Add' button appends a blank record. When the text boxes are filled in, and I search for a pre-existing record using the key fields, I find the record I'm adding!!!
>>
>>What is the right way to do this? Does it involve public/private datasessions - buffermode settings - etc.?
>>
>>Please be specific, this is driving me crazy...
>>
>>TIA
>
>Usually, INSERT-SQL is preferable to create new records, i.e. you generate unique key first and then use it to get a record.

Well, For using a Cursor to hold the table data, and would work like:

If the Primary Key, Replace the existing record, as some field(s) may change!
else insert a new record of the data.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform