Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

ConnectToServer – PB Docs 126 – PowerBuilder Library

ConnectToServer – PB Docs 126

ConnectToServer PowerScript function

Description

Connects a client application to a server component. The client
application must call ConnectToServer before
it can use a remote object on the server.

This function applies to distributed applications only.

Controls

Connection objects

Syntax

Argument

Description

connection

The name of the Connection object you
want to use to establish the connection. The Connection object has
properties that specify how the connection will be established.

Return Values

Long. Returns 0 if it succeeds and one of the following values
if an error occurs:

  • 50 Distributed
    service error

  • 52 Distributed communications error

  • 53 Requested server not active

  • 54 Server not accepting requests

  • 55 Request terminated abnormally

  • 56 Response to request incomplete

  • 57 Connection object not connected to server

  • 62 Server busy

  • 92 Required property is missing or invalid

Usage

Before calling ConnectToServer, you assign
values to the properties of the Connection object.

Examples

In this example, the client application connects
to a server application using the Connection object myconnect:

You can enclose the ConnectToServer function
in a try-catch block to catch exceptions thrown during the attempt
to connect. This example uses SSLServiceProvider and SSLCallBack
objects to create a secure connection. An exception or other error
in any of the SSLCallback functions raises the CTSSecurity::UserAbortedException.
The error-handling code shown in the example displays a message
box with the text of the error message, but your code should take
additional appropriate action:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x