Kbase P23195: How to do a test connection to a Progress Appserver?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/01/2005 |
|
Status: Unverified
GOAL:
How to do a test connection to a Progress Appserver?
FIX:
Below is a simple program to test a connection to an AppServer.
************************************************************
DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
DEFINE VARIABLE ret AS LOGICAL NO-UNDO.
/* Create Appserver handle*/
CREATE SERVER hAppSrv.
/* Connect to Appserver*/
ret = hAppSrv:CONNECT("-AppService <AppServiceName> -H <HostName> -S <NameServerPort>").
/* Error checking, in case connect failed */
IF NOT ret THEN
RETURN ERROR "Failed to connect to AppServer".
/* We have connected to AppServer */
MESSAGE "Connected" VIEW-AS ALERT-BOX.
/* Disconnect from AppServer */
ret = hAppSrv:DISCONNECT().
/* Delete the Appserver handle */
DELETE OBJECT hAppSrv.
***********************************************************