>IF rlock()
>REPLACE *fields*WITH *variables*
>ELSE
>wait window "Lock failed try again"
>UNLOCK
>LOOP
>ENDIF
>SELECT B
>REPLACE "fields* WITH *variables*
>UNLOCK
>
>It seems to me that there should be an UNLOCK right before SELECT B, and
>then another rlock() before REPLACE fields in B. Also, does the LOOP
>command retry the rlock or where does it go?
The Unlock command will release all the locks, so once is enough. This
kind of manual locking is rarely used, and the reasons may vary. One of
them is that in some networks there were problems with implicit locking
(had one case in 1991, been solved by next release of the network - but
that is all the cases I've had), so some manual locking had to be used.
Now this kind of problem is obsolete, never heard of a thing like that
on contemporary networks - automatic locking will surely do good enough.
Simply comment out the code starting with If Rlock() up to the EndIf.
The Loop command should iterate the loop once more, skipping the rest of
the commands till the end of the loop. It's supposed that the part of
code shown here is inside some kind of Do While...EndDo, Scan...Endscan
or For...EndFor loop.