Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on duplicate key
Message
De
02/04/2005 09:45:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01000949
Message ID:
01000978
Vues:
18
>Hi to All,
>
>I need help about this 'scenario'.
>In a Data Form, I manage an MS SQL Table with a PK.
>I manage this Table with a Cursor Adapter, created with CA Builder (is a class).
>How can I to verify, when the record is new and immediatly after I enter the primary Code, that this Code isn't duplicate ? This PK isn't automatically generated.
>The control on the duplicate key is currently active only when I try to save and this isn't interesting for me.
>
>Thank you for help and any code suggestion.
>
>Best Regards

You might SELECT data from the table, for records that have the primary key. If more than zero records are returned, you will have a duplicate.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform