lockrecord

The lockrecord statement attempts to lock the current record, and waits if it is currently locked by another user.


Parameters

No parameters.


Description

This statement attempts to lock the current record. If the record is already locked by another user, the procedure displays a dialog and waits for the record to become available.

let ReceivedQuantity=""
gettext "How many "+Item+" were received?",ReceivedQuantity
ReceivedQuantity=val(ReceivedQuantity)
LockRecord
if error
    message “These items could not be added to the database quantity. “+
        “Be sure to process them again later.“
    rtn
endif
Qty=Qty+ReceivedQuantity
UnlockRecord

If you don’t want the code to wait if the record is locked, use the lockorstop statement or the lockcurrentrecord( functionn.


See Also


History

VersionStatusNotes
10.2No ChangeCarried over from Panorama 6.0.