>> * NextId.Prg
>> LPARAMETERS pcTable
>> IF NOT USED("SysKeys")
>> SELECT 0
>> USE SysKeys ALIAS SysKeys AGAIN
>> ELSE
>> SELECT SysKeys
>> ENDIF
>> SET ORDER TO TableName
>> SEEK UPPER(pcTable)
>> DO WHILE NOT FLOCK()
>> ENDDO
>> IF FOUND()
>> liKey = NextID
>> REPLACE NextId WITH NextID + 1
>> ELSE
>> APPEND BLANK
>> REPLACE NextId WITH 1
>> liKey = 0
>> ENDIF
>> UNLOCK
>
>Is there any special consideration in order to use FLOCK() instead of RLOCK()?
Michel,
No, my actual code uses RLOCK() I just typed FLOCK() in the message by accident. Actually RLOCK() is probably better.