>>If the logic works correctly in single-user mode, I would suggest you extend the idea to a LAN, applying rlock() to relevant records.
>
>Actually will I have to RLOCK() the LDB and also there are corresponding stock entries in a stock ledger DBF, anything simpler. I have standard UDFs for save etc. somehow can I standarize the whole thing so I don't have to remember to RLOCK(). Where and how can I free the RLOCK(). Sorry but I am not much with LAN commands.
Where: You unlock the record as soon as you don't need the lock any more. How: with the UNLOCK command.
For example:
(go to parent table)
(search record)
if rlock()
(go to child record)
(do your changes)
(back to the parent record)
unlock
else
(postpone, or show an error message)
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)