Salesforce

How to prevent error 2624 being displayed when a record is locked by another user

« Go Back

Information

 
TitleHow to prevent error 2624 being displayed when a record is locked by another user
URL NameP11482
Article Number000154610
EnvironmentProduct: Progress
Version: All Supported Versions
Product: OpenEdge
Version: All Supported Versions
OS: All Supported Platforms
Question/Problem Description
How to prevent error 2624 being displayed when a record is locked by another user
How to prevent the display of message "<file-name> in use by <user> on <tty>.  Wait or choose CANCEL to stop. (2624)"
How to avoid error 2624
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
Use the NO-ERROR and NO-WAIT options with the FIND statement.

When using FIND with EXCLUSIVE-LOCK NO-ERROR, if the record is already locked by another user then OpenEdge will raise error 2624 and wait until the record is released or the user cancels the operation.

The NO-ERROR option does not suppress the display of the error message 2624 when the record is locked unless the NO-WAIT option is used on the FIND.


The NO-WAIT option causes FIND to return immediately and raise an error condition if the record is locked by another user, unless the NO-ERROR option is used on the same FIND statement.


To prevent both the raising of error 2624 and the display of the error message, the NO-ERROR and NO-WAIT options must be used together.

Example:
 
REPEAT TRANSACTION:
    FIND FIRST customer EXCLUSIVE-LOCK NO-ERROR NO-WAIT.
    IF AVAILABLE customer THEN
    DO:
        UPDATE name.
        LEAVE.
    END.
END.
Workaround
Notes
References to Other Documentation:

OpenEdge Development: ABL Reference, "ABL Syntax Reference"
Keyword Phrase
Last Modified Date10/30/2019 8:00 PM

Powered by