Hmm thanks
I was a bit suspicious about that myself. The usual keytable methods lock the record in the keytable briefly to guarantee a unique key is returned.
That would not be possible in a muti user environment because a user might be editing the latest record.
Maybe this article should be amended to show this gotcha or perhaps removed.
>I have the initial impression that the function looks for the largest value already stored in the PK, and then increments one.
>
>If that is how it works, this won't work correctly on a network, especially with buffering.
>
>Hilmar.
>
>>The UT Article "The Easy Way to Form a Primary Key "
>>
>>
http://www.geocities.com/vhpcg/primkey.html>>
>>Looks like a great solution for generating primary keys.
>>
>>It does away with the need for a seperate key table and it needs no parameters to work correctly.
>>
>>It also looks like it solves the problem of the wrong keytable being used if you are working with 2 databases open
>>
>>I am considering adopting this code for some of my DBCs.
>>
>>I would like to know if folks have been using it happily, or can anyone spot any problems in the code.
>>
>>Many Thanks