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

Using the wizard to create a Connection object – PB Docs 125 – PowerBuilder Library

Using the wizard to create a Connection object – PB Docs 125

Using the wizard to create a Connection object

When you select EAServer as
the connection type in the Connection Object wizard, PowerBuilder
creates a standard class user object inherited from the Connection
object. You supply the Connection object properties in the wizard and
specify whether connection information will be provided in the registry,
an INI file, or a script. The Connection Object
wizard gets information about the server you want to connect to
from the EAServer profiles you
have set up. For how
to create an EAServer profile,
see “Creating an application
server profile “
.

The Constructor event of the Connection object calls a function, of_getconnectioninfo,
that gets the stored connection information from the source you
specified.

Once you have used the Connection Object wizard to create
a Connection object, you need to execute the PowerScript statements
required to perform these operations:

  1. Use the Create statement to instantiate
    the Connection object.

  2. Invoke the ConnectToServer function
    to establish a connection to the server.

  3. (Optional) Check for errors.

You do not need to set properties for the Connection object,
but you can modify them in the of_getconnectioninfo function.
You can also set options for the Connection object in its constructor
event, for example:

Example

The following script instantiates the myconnect instance
of the n_myclient_connect object
created by the wizard, invokes the ConnectToServer function
to establish a connection to the server, and checks for errors:

Establishing multiple connections

You can establish multiple connections in a single client
application. If you want to connect a client to two different servers,
run the Connection Object wizard again to create a new user object
with different connection properties.


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