Consultor Eletrônico



Kbase P97916: How is the "userid" parameter specified in the CONNECT() method for an AppServer handle passed to th
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

How is the "userid" parameter specified in the CONNECT() method for an AppServer handle passed to the AppServer side ?

GOAL:

How is the "password" parameter specified in the CONNECT() method for an AppServer handle passed to the AppServer side ?

GOAL:

How is the "appserver-info" parameter specified in the CONNECT() method for an AppServer handle passed to the AppServer side ?

FIX:


The CONNECT() method for an AppServer handle has the following syntax on the 4GL client side:

hAppServer:CONNECT ( [ connection-parms ] [ , userid ] [ , password ] [ , appserver-info ] )

The optional parameters userid, password and appserver-info that the 4GL client may specify, can be retrieved on the AppServer side via the AppServer Connect procedure, if any, or via the CODEBASE-LOCATOR system handle.


For the AppServer Connect procedure, those parameters are passed as three input parameters for the Connect procedure itself:

/* AppServerConnectProcedure.p. */
DEFINE INPUT PARAMETER user-id AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER password AS CHARACTER NO-UNDO.
DEFINE INPUT PARAMETER appserver-info AS CHARACTER NO-UNDO.

Those parameters that are not specified in the CONNECT() method are passed to the AppServer Connect procedure as blank.


Outside the AppServer Connect procedure, the userid, password and appserver-info passed to the CONNECT() method can be retrieved via the following attributes respectively:

CODEBASE-LOCATOR:APPSERVER-USERID
CODEBASE-LOCATOR:APPSERVER-PASSWORD
CODEBASE-LOCATOR:APPSERVER-INFO