>Shouldn't you also replace the TableName here?
>
>> REPLACE NextId WITH 1
>> liKey = 0
>> ENDIF
>> UNLOCK
It probably never went into that condition. In my case, I don't have that condition. As developers we always add those records in the unique id table at development time. :) But, yes, it might be a good idea to put it there just in case we forget it during development.