>I take it that a DBC is not involved.
>So in that case I would use a semaphore when creating the primary key value. If the semaphore is not available, program would not create a primary key. It would either wait for the semaphore to be available or return to calling code telling user to try again.
I use free FoxPro 2 stucture tables only, no DBC.
Creating primary key requires reading last used key current value.
FLOCK() does this. It refreshed locked table with current values even from other users.
If you use semaphore (mutex?) then current values are not read to keys table.
So it is not possible to use some semaphore.
Andrus