LOCKED function
- Last Updated: January 18, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Returns a TRUE value in the following cases:
- a record is not available to a prior FIND . . . NO-WAIT statement because another user has locked the record
- a record is not available to a GET . . . NO-WAIT statement because another user has locked the record
Syntax
|
- record
-
The name of a record or buffer.
To use the LOCKED function with a record in a table defined for multiple databases, you must qualify the record's table name with the database name. See the record definition in the Record phrase reference entry for more information.
Example
The FIND statement in this procedure tries to retrieve a customer record according to a supplied customer number. Because of the NO-ERROR option, the FIND statement does not return an error if it cannot find the record. The NO-WAIT option causes FIND to return immediately if the record is in use by another user.
r-locked.p
|
A record might not be available if it is locked (being used by another user) or does not exist. The LOCKED function returns a TRUE value if the record is locked. In this case, the r-locked.p procedure displays a message that the record is locked. If the record is not locked, the procedure displays a message that the record does not exist.
See also
AMBIGUOUS function, AVAILABLE function, FIND statement, NEW function (record buffers)