Error while connecting to Appserver

Posted by Admin on 16-Jun-2007 00:22

I want to establish a connection with the Appserver. I have set my local system as Appserver and tried to connect using progress code. But it is giving error like Name server not found for the port number. But when I checked it in Progress explorer tool appserver service name and name server are in running status. I am attaching the code which I have tried. Please help me .

DEFINE VARIABLE sta AS LOGICAL NO-UNDO.

DEFINE VARIABLE connectpar AS CHAR NO-UNDO INIT "-AppService

NS1 -S 5162 -H localhost -N TCP".

DEFINE VARIABLE h-appsrv AS HANDLE NO-UNDO.

CREATE SERVER h-appsrv.

sta = h-appsrv:CONNECT(connectpar).

IF NOT sta THEN

MESSAGE "Could not connect to AppServer" SKIP

"using connect-string: " SKIP connectpar SKIP VIEW-AS ALERT-BOX.

ELSE DO:

MESSAGE "connection established"

VIEW-AS ALERT-BOX INFO BUTTONS OK.

sta = h-appsrv:DISCONNECT().

END.

Thanks in advance

Prasad

All Replies

Posted by kevin_saunders on 18-Jun-2007 03:32

The problem is your connect variable is incorrect..

DEFINE VARIABLE connectpar AS CHAR NO-UNDO INIT "-AppService NS1 -S 5162 -H localhost -N TCP".

The -AppService parameter takes the name of the AppServer as registered with the NameServer.. NS1 is the default name of the NameServer. Change this to the name of the AppServer and you should be good to go.

This thread is closed