Consultor Eletrônico



Kbase P76519: How to investigate Error 2128
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/17/2004
Status: Unverified

SYMPTOM(s):

Invalid or inappropriate handle value given to RUN...IN statement. Procedure '<calling-procedure>':<line-number>. (2128)

Running an internal procedure in a persistent procedure.

CAUSE:

Problem in the application to maintain context. Error 2128 is not about trying to run something in an invalid handle, but about trying to run/call an entry in a handle variable that does not handle a persistent procedure.
Example: RUN myProc IN aButton:HANDLE. Yes it does not make sense to run something in a button, but the 4GL uses the HANDLE data type for everything.

FIX:

Investigate your code by checking the type of HANDLE you want to run something in, as illustrated bellow:
<pre>
RUN myEntry IN hMyPersistentProc. NO-ERROR.
/* if error 2128, then I would like to know more about this hMyPersistentProc
We might learn a lot about how the context is maintained in the application*/
IF ERROR-STATUS:ERROR
AND ERROR-STATUS:GET-NUMBER(1) = 2128
THEN DO:
/* Use a file for AppServer session, for interactive sessions, you may just
use messages*/
OUTPUT TO error2128.txt APPEND.
/* this is a start, next time, you may want to report more stuffs about
this handle */
PUT UNFORM "hPersistentProc:TYPE :" hPersistentProc:TYPE "
hPersistentProc:NAME :" hPersistentProc:NAME SKIP.
OUTPUT CLOSE.
END.</pre>