Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique ID Key Issue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00196308
Message ID:
00196378
Vues:
28
>Thank You Arnon.
>That's exactly the way we do it !
>We tested it and it works fine on a Win95 PC where the database resides and Win95 wworkstations.
>But when we tested it on an NT server and Win95 workstations, the duplication happens!

DO you use NT 4.0 SP3? Anything lower had file locking bugs.

Also, do you have your ID field set as a primary key? If so, the DBC should not allow duplicate keys. Also, remember, it is possible for a user to put a key value into the file and later have the newid() SP try to use one that was manually created. A default value isn't used unless the value is empty or null when the view is saved to the table.

Also, why not just modify your newid() procedure to do an indexseek into the table while the ID record is still locked? If the key exists increment it again and try again. This may help.

BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform