Consultor Eletrônico



Kbase P113836: Sample code to connect to AppServer from regular Progress client
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/8/2008
Status: Verified

GOAL:

Sample code to connect to AppServer from regular Progress client

GOAL:

How do I test connection to AppServer from Progress clients?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

Following is sample code to test regular Progress client to App Server connection


DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
DEFINE VARIABLE ret AS LOGICAL NO-UNDO.
DEF TEMP-TABLE htable LIKE customer.
CREATE SERVER hAppSrv.
ret = hAppSrv:CONNECT("-AppService asbroker1 -H localhost -S 5162","","").
IF NOT ret THEN
RETURN ERROR "Failed to connect to AppServer".
ELSE
DO:
MESSAGE "connected to appserver" VIEW-AS ALERT-BOX.
RUN count.p ON hAppSrv.
RUN disconn.p ON hAppSrv.
END.
ret = hAppSrv:DISCONNECT().
DELETE OBJECT hAppSrv.

=============================
disconn.p


DISCONNECT prog91d.