Joe,
You'll want to lock the record.
DO WHILE NOT RLOCK()
ENDDO
UNLOCK
It sounds similar to the process used in TasTrade for unique keys. Look at the stored proc NextId in TasTrade.
>My app is updating a table that contains a numeric field counter. One user will update it to one then the next makes it two and so on. I check CURVAL right before counter is updated to make sure I get the latest value. If two users try to update at the same time 'set reprocess' will just wait a bit and retry. This is bad as now the counter has changed and the value I got from CURVAL is outdated. Can I turn set reprocess off so that the update just fails and the user has to initiate the update process again (which will reload CURVAL)?