>RLOCK( alias(), '0' ) will lock the header record. I intent to use this, in a certain legacy app, to have enough time to retrieve a next ID from the same table, that can be used in a new record. The rlock of the header should prevent that a concurrent user tries the same thing at the same time, and retrieves the same ID.
>
>Currently, the table is filelocked, but that action regularly frustrates users, when someone else has a record lock on one of the existing records at the same time.
>
>Has anyone here experience with this type of use of RLOCK()? Will the method be bulletproof?
Filelock is imo better than recordlock in case there is no entry yet
It is not normal that the users complain, a nextid seek and rewrite takes no time at all
You
do have a separate table for the nextid's, don't you ?
Gregory