Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique ID Key Issue
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00196308
Message ID:
00196378
Views:
21
>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
Map
View

Click here to load this message in the networking platform