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

Syntax 1 For creating an object instance on a remote server – PB Docs 150 – PowerBuilder Library

Syntax 1 For creating an object instance on a remote server – PB Docs 150

Syntax 1 For creating an object instance on a remote server

Description

Creates an instance of a component running on EAServer. This function can be used
to instantiate a remote object from a PowerBuilder client. In addition,
it can be used within a component running on EAServer to instantiate another component
running on a different server.

Controls

Connection objects

Syntax

Argument

Description

connection

The name of the Connection object used
to establish the connection.

objectvariable

A global, instance, or local variable
whose datatype is the same class as the object being created or
an ancestor of that class.

classname (optional)

A string whose value is the name of the
class datatype to be created. You can optionally prepend a package
name followed by a slash to the class name (for example, “mypkg/mycomponent“).

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 Not connected

  • 62 Server busy

Usage

Before calling CreateInstance, you need
to connect to a server. To do this, you need to call the ConnectToServer function.

CreateInstance allows you to create an
object on a remote server. If you want to create an object locally,
you need to use the CREATE statement.

When you deploy a remote object’s class definition
in a client application, the definition on the client has the same
name as the remote object definition deployed in the server application.

Variables declared with this type are able to hold a reference to
a local object or a remote object. Therefore, at execution time
you can instantiate the object locally (with the CREATE statement)
or remotely (with the CreateInstance function)
depending on your application requirements. In either case, once
you have created the object, its physical location is transparent
to client-side scripts that use the object.

Examples

The following statements create an object locally
or remotely depending on the outcome of a test. The statements use
the CreateInstance function to create a remote
object and the CREATE statement to create a local
object:

See Also

ConnectToServer


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