Progress
Language Reference


CONNECT( ) Method
(AppServer)

Connects to and associates a Progress AppServer instance with the specified server handle. The current application becomes a client application of the connected AppServer.

Return Type: LOGICAL

Applies To: Server Object Handle

SYNTAX
CONNECT (
        [ connection-parms ]
        [ , userid ] [ , password ] [ , app-server-info ]
        ) 

All of the parameters for the CONNECT( ) method are optional and have defaults if you do not specify them.

connection-parms

A character string containing a space-separated list of one or more AppServer connection parameters. Table 48 describes each AppServer connection parameter that you can include in this string. If you include any other parameters in this string, the method ignores them.

Table 48: AppServer Connection Parameters
Parameter
Description
-AppService application-service
The name of an Application Service supported by the specified Name Server. (Defaults to the default service for the specified Name Server.)
-H name-server-address
The network address of the Name Server machine. You can specify either the TCP/IP host name or the Internet protocol address of the machine. (Defaults to localhost.)
-S name-server-port
The port number for the Name Server connection. You can specify either an explicit port number or a UDP service name. If you use a UDP service name, the method uses the port number associated with that name in the TCP/IP services file. (Defaults to 5162)
-URL url-address
The URL address of an AppServer. When specified, the -AppService, -H, and -S parameters are ignored.
For more information on the -URL parameter, see the AppServer Internet Adapter section in the Progress Version 9 Product Update Bulletin.
-pf filename
A text file containing any of the other AppServer connection parameters described in this table. If this file contains any other Progress startup parameters, the method ignores them.

[ userid ] [ , password ] [ , app-server-info ]

From one to three character string parameters passed as input to the AppServer Connect procedure. The possible values that you can specify for these parameters is determined by the Connect procedure for the AppServer application. If you omit a parameter, it defaults to the unknown value (?).

If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Otherwise, it returns TRUE. An error can occur if:

If CONNECT( ) completes successfully, the CONNECTED( ) method returns TRUE.

The connection lasts until the client application executes the server handle DISCONNECT( ) method or until Progress detects any failure conditions that automatically terminate the connection.

The -URL connection parameter allows you to connect to an AppServer using the AppServer Internet Adapter (AIA) with the following protocols: HTTP and HTTPS.

For more information on the AppServer Internet Adapter (AIA), see Progress Version 9 Product Update Bulletin.

For more information on Progress AppServers, see Building Distributed Applications Using the Progress AppServer .


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095