Kbase P22994: Message 2624 while doing ASSIGN NO-ERROR , with a shared loc
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/9/2003 |
|
Status: Unverified
SYMPTOM(s):
<file-name> in use by <user> on <tty>. Wait or choose CANCEL to stop. (2624)
Record is SHARED locked
Doing ASSIGN Table.field = ... NO-ERROR.
The program flow remains at the ASSIGN Statement and ERROR-STATUS:ERROR is not set.
Record is actually also SHARED locked by another user
CAUSE:
This case is a little exception for error handling with the ERROR-STATUS system handle.
The ASSIGN Statement cannot trap the lock conflict message 2624 with the NO-ERROR option. The idea of ASSIGN NO-ERROR is more about the handling of datatype mismatch problems during the assignment itself, rather than the upgrade of a share lock to exclusive that leads to a lock conflict.
This message 2624 is a special message, neither an error nor a warning, since it manages a dialog with User Interaction and a cancel button to raise an error condition.
FIX:
The only way to avoid message 2624 and handle lock conflicts by program is to rely on:
FIND CURRENT MyTable EXCLUSIVE NO-ERROR NO-WAIT.
IF NOT AVAILABLE MyTable AND LOCKED MyTable
THEN ErrorHandling: DO:
[...]