Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement