Kbase P105766: Code example to reproduce the error: Database does not exist or is not open. (3141)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  29/06/2005 |
|
Status: Unverified
GOAL:
Code example to reproduce the error: Database <dbname> does not exist or is not open. (3141)
GOAL:
How to reproduce: Database sports does not exist or is not open. (3141)
FACT(s) (Environment):
Progress 9.x
FIX:
The following code example shows how to reproduce the error 3141:
DEF VAR vretry AS LOGICAL INITIAL TRUE.
DEF VAR reconnect AS LOGICAL INITIAL TRUE.
DO WHILE vretry.
IF NOT CONNECTED ("sports") THEN DO:
MESSAGE "Database sports is not connected - reconnect?" VIEW-AS ALERT-BOX BUTTONS YES-NO UPDATE reconnect.
IF reconnect THEN CONNECT sports -N tcp -H localhost -S 4567 .
END.
DISCONNECT sports.
/*Because we disconnected the sports database this is where the error occurs */
DISPLAY NEXT-VALUE(next-cust-num, sports) NO-ERROR.
vretry = ERROR-STATUS:ERROR .
IF ERROR-STATUS:ERROR THEN DO:
/* There we display the error */
MESSAGE "Got Error: " ERROR-STATUS:GET-MESSAGE(1) VIEW-AS ALERT-BOX.
END.
END.