Kbase P53496: Invalid cursor position (8956) having EXCLUSIVE-LOCK query o
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/18/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1x
SYMPTOM(s):
Invalid cursor position (8956)
query of SDO EXCLUSIVE-LOCK accessed by Open Client
error (2819) in server log file of AppServer for serverSendRows
CAUSE:
The reason is that there is an empty result set returned from the AppServer because of error 2819. The AppServer procedure serverSendRows uses a GET statement to retrieve the rows for the resultset.
The GET statement inherits it's lock mode from the most recent OPEN
QUERY statement, unless you give a lock-mode on the GET itself. So if
you do an OPEN QUERY... EXCLUSIVE-LOCK, and then do a subsequent GET
on that query, the GET will be EXCLUSIVE-LOCK too.
FIX:
In order to complete the GET, you must have a transaction running. You may
enclose the GET inside a DO TRANSACTION, or REPEAT TRANSACTION, or
change the lock mode on the GET, e.g. GET .... SHARE-LOCK...
Changing the procedure serverSendRows within data.p that way solves the problem.
Example for changed code:
PROCEDURE serverSendRows :
DEFINE INPUT PARAMETER piStartRow AS INTEGER NO-UNDO.
DEFINE INPUT PARAMETER pcRowIdent AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER plNext AS LOGICAL NO-UNDO.
DEFINE INPUT PARAMETER piRowsToReturn AS INTEGER NO-UNDO.
DEFINE OUTPUT PARAMETER piRowsReturned AS INTEGER NO-UNDO.
DEFINE OUTPUT PARAMETER TABLE-HANDLE phRowObject.
DO TRANSACTION.
RUN sendRows IN TARGET-PROCEDURE (piStartRow,
pcRowIdent,
plNext,
piRowsToReturn,
OUTPUT piRowsReturned).
{get RowObjectTable phRowObject}.
END.
END PROCEDURE.