General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only