Kbase P10687: OCX:method() or setting OCX:Attribute fails without error message in AppServer Session.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/11/2008 |
|
Status: Unverified
SYMPTOM(s):
Appserver Session
Using ActiveX
Calling a method or setting an attribute fails without error message.
Msxml2.DOMDocument.3.0:load() fails without error message.
CAUSE:
As the session is AppServer, errors such as error 5890 or 5677 cannot be displayed at the screen as it would with a interactive 4GL session.
FIX:
The following code reports the error(s) message(s) that are returned by the OCX and added in the 4GL error stack with error 5890:DEFINE VARIABLE MthRtn AS LOGICAL NO-UNDO.
DEFINE STREAM LogFile.
/*OCX Method we would like to call and check it was successful*/
MthRtn = <Ocx>:<Method>("<Parameters>") NO-ERROR.
/* Or if we want to check if setting an OCX Attribute is successful
<Ocx>:<Attribute> = <Value> NO-ERROR.*/
IF ERROR-STATUS:ERROR THEN DO:
OUTPUT STREAM LogFile TO LogFile.txt.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO ERROR-STATUS:NUM-MESSAGES:
PUT STREAM LogFile UNFORMATTED
i "/" ERROR-STATUS:NUM-MESSAGES
" " ERROR-STATUS:GET-NUMBER(i)
"=>" ERROR-STATUS:GET-MESSAGE(i).
END.
OUTPUT STREAM LogFile CLOSE.
END.