I am trying to connect to an Oracle Schema from a .p file. I have written the following code for this: -
CONNECT db_name VALUE(lv_connect_string) NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
DO j = 1 TO ERROR-STATUS:NUM-MESSAGES:
MESSAGE string(j)
VIEW-AS ALERT-BOX INFO BUTTONS OK.
MESSAGE "error" ERROR-STATUS:GET-NUMBER(j)
ERROR-STATUS:GET-MESSAGE(j).
END.
END.
I wish to trap all the Oracle error codes that occur while connecting to the database. Like, for example, for an expired password Oracle error code is 28001 and if the password is locked, error code is 28000. This is what I need to trap in my code and then handle it accordingly.
But the errors that I get on screen are progress error codes, which do not provide me enough details about what errors occured while connecting to the database. Like Error 1252 Oracle Error and error 1451 Unable to connect to Oracle Database. For all oracle errors like 28000, 28001 or 28002, same progress error codes are being returned, which unable me to identify the cause of the error.
Is there any way by which I can trap the actual Oracle error that occured while connecting to the database?
Can anyone please help.
Thanks in advance,
Shilpa.
CONNECT db_name VALUE(lv_connect_string) NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
DO j = 1 TO ERROR-STATUS:NUM-MESSAGES:
MESSAGE string(j)
VIEW-AS ALERT-BOX INFO BUTTONS OK.
MESSAGE "error" ERROR-STATUS:GET-NUMBER(j)
ERROR-STATUS:GET-MESSAGE(j).
END.
END.
I wish to trap all the Oracle error codes that occur while connecting to the database. Like, for example, for an expired password Oracle error code is 28001 and if the password is locked, error code is 28000. This is what I need to trap in my code and then handle it accordingly.
But the errors that I get on screen are progress error codes, which do not provide me enough details about what errors occured while connecting to the database. Like Error 1252 Oracle Error and error 1451 Unable to connect to Oracle Database. For all oracle errors like 28000, 28001 or 28002, same progress error codes are being returned, which unable me to identify the cause of the error.
Is there any way by which I can trap the actual Oracle error that occured while connecting to the database?
Can anyone please help.
Thanks in advance,
Shilpa.