I'd like to hear different methods to deal with ever existintg problem of avoiding to generate duplicate key numbers in a multi use environment.
Specifically, we have a multi user application, we use a system table to keep the values of the last ID generated and use FLOCK() to prevent other user from getting to the table.
This, for some reason doesn't work, we have found at one customer, duplication of ID's.
The DataBase resides on an NT server and the APP resides on the workstations.
Somebody suggested to me to use CoCreateGUID API call.
I've been thinking about opening the system table exclusively while the new key is been generated.
But I'd like to hear more ideas from you guys.
Thanks