>After years, I find that I may not understand record locking as well as I thought!
>
>Let's say I have a SET REPROCESS TO 10 SECONDS
>
>And then I try to do an RLOCK() on a record that a user wants to edit.
>
>Let's say the RLOCK() fails after 10 seconds...control goes to my error handler.
>
>In the error handler, I trap error 108 (record is in use)...the 'problem' is that in the error handler, I want to be able to present the user with a messagebox and ask them if they want to retry (so they can go find out who has the record locked, then respond to the message). However, it appears that RETRY doesn't try for another 10 seconds to lock. Is that correct?
>
>TIA,
>Kevin
Kevin,
You get error after rlock(). How about another approach :
declare Sleep in Win32API integer
set reprocess to 1
start=datetime()
do while !rlock()
if datetime()-start > 10
if messagebox('Continue to wait ?',YESNO)=NO
exit
else
start=datetime()
endif
endif
Sleep(10)
enddo
Cetin