Using the Connection object
This
section describes how to build a .NET client application for an EAServer component using the Connection
object. You need to complete the following steps:
- Use the Template Application target wizard to create
a client application, then use a .NET application wizard to create
a .NET target using the library list and application object of the
target you just created.
Alternatively, use a .NET target wizard to build a client
application from scratch. - Use the EAServer Connection
Object Wizard to create a standard class user object inherited from
the Connection object. You can then use this object in a script
to establish a connection. First set connection options, then call
the ConnectToServer function.
If you use the Template Application wizard to create the client
application, you can create the Connection object in that wizard. - Use the EAServer Proxy
Wizard to create a project for building a proxy object for each
EAServer component that the .NET client will use, then generate
the proxy objects. The EAServer Proxy icons on the Project page of
the New dialog box are enabled for all .NET target types. - Write the code required to create the EAServer component instance using the CreateInstance function.
- Call one or more component methods from the client.
The steps are the same for .NET clients and standard PowerBuilder
clients. For detailed steps, see the chapter “Building
an EAServer Client” in Application Techniques
.
.NET client differences
There are some differences you should be aware of when you
use a Connection object with a .NET client. The following table
lists some properties that have different behavior in .NET client
applications. Properties and functions that are obsolete or for
internal use only in standard PowerBuilder applications are also unsupported
in .NET applications. All other properties, functions, and events are
supported.
| Property | Description |
|---|---|
| Driver | Only Jaguar and AppServer are supported values. Any other value results in a runtime error. |
| ErrorCode | The following error codes are supported:
The same error codes are returned by the ConnectToServer function. |
| Options | The following options support SSL connections from .NET clients. These options are case sensitive and are not available for standard PowerBuilder (Win 32) clients:
For more information, see “SSL connection support”. |