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

Deploying a PowerBuilder COM server – PB Docs 90 – PowerBuilder Library

Deploying a PowerBuilder COM server – PB Docs 90

Deploying a PowerBuilder COM server

Once you have generated a PowerBuilder COM server, you can
use COM-enabled client applications to create the PowerBuilder
COM objects and access their methods. You can use the server with
any COM-enabled application or deploy it as a package to MTS or
COM+.

Using a PowerBuilder COM server with a COM-enabled
application

proc.gif To use a PowerBuilder COM server with a COM-enabled
application:

  1. Deploy the PowerBuilder COM server to the user’s
    computer.

  2. Deploy the PowerBuilder virtual machine (PBVM90.DLL)
    and any other required modules (such as PBDWE90.DLL or
    any required database software) to the computer containing the PowerBuilder
    COM server.

  3. Register the PowerBuilder COM server on the user’s
    computer.

  4. Write a client application that calls PB object functions
    in the PowerBuilder COM server.

    See “Accessing PowerBuilder COM
    servers from clients”
    .

Registering PowerBuilder COM servers When you deploy a PowerBuilder COM server, you need to add
information to the registry to enable COM to create instances of
the server’s objects. PowerBuilder COM servers are self-registering—you
do not need to create a separate registration file. To register
a PowerBuilder COM server, use the REGSVR32 utility.
For example:

If you want to access the server from a remote client, you
need to make an additional change to the registry and you may need
to configure the client for remote access to the server. For more
information, see “Using PowerBuilder COM servers
and objects with DCOM”
.

note.gif Registering automatically for testing For testing purposes, you can check the box on the General
property page that registers the server on the development computer
automatically when it has been generated. To avoid making unnecessary
registry entries on your computer, check this box only when you
are ready to test the PowerBuilder COM server.

Deploying PowerBuilder COM objects to MTS

PowerBuilder COM objects can be deployed directly to MTS or
imported into MTS as MTS components.

Server requirements

The server to which you deploy a PowerBuilder COM server needs
the following software and files:

  • MTS 2.0 or
    greater
  • NT 4.0 with Service pack 3 or later
  • PowerBuilder COM objects using database connections
    via ODBC drivers (ODBC 3.0 or greater)
  • PowerBuilder deployment DLLs installed and in the
    user’s path
  • PowerBuilder COM server DLL(s) on a local file system

If MTS is installed

If MTS is installed and running on the computer where you
build the PowerBuilder COM server, you can deploy directly to MTS
from the Project painter. You can also create a PAK file that you
can use to import the package into an MTS server on another computer,
and a client configuration utility that adds to a client computer
all the information required to use the components in the package,
including registry information and the component’s type
library. These options are available on the MTS Package property
sheet in the Project painter.

note.gif About registry information If you import the package into an MTS server on another computer,
verify that the path information in both the package and the client
configuration utility is correct. Supporting files such as PBVM90.DLL may
be installed in a different location.

If MTS is not installed

To deploy PowerBuilder COM objects to an MTS server running
on a different computer, you need to complete the following steps:

  1. Deploy files to the MTS
    server computer
    .
  2. Import PowerBuilder COM
    objects into MTS
    .
  3. Create the client deployment
    file
    .
  4. Install the client deployment
    file
    .

Deploy files to the MTS server computer

Copy the generated PowerBuilder COM server DLL to a directory
on the MTS server computer’s local file system, along with PBVM90.DLL and
any other required PowerBuilder runtime DLLs.

Import PowerBuilder COM objects into MTS

To import PowerBuilder COM objects into MTS, you need to select
the computer where you want to deploy the PowerBuilder COM libraries,
create a package, import the objects, set their transaction properties,
and verify that their interfaces and methods display correctly.

proc.gif To select the MTS server computer name:

  1. From the MTS server computer, open the MTS Explorer.

  2. Select and expand the Computers folder.

  3. Select and expand the appropriate computer name folder.

proc.gif To create a new package:

  1. Select the Packages Installed folder.

  2. Select New from the pop-up menu.

  3. From the Package Wizard dialog box, select Create An
    Empty Package.

  4. Enter a package name.

  5. From the Set Package Identity dialog box, select Interactive
    User or set a specific user name and password.

note.gif Visual content If functions in your custom class user objects inadvertently
display visual content such as a message box, the execution of that
visual content will appear to hang if the component’s user
is set to anything but the interactive user.

proc.gif To import PowerBuilder COM objects as MTS components:

  1. Select and expand the newly created package name
    folder.

  2. Select the component folder and select New>Component
    from the pop-up menu.

  3. From the Component Wizard dialog box, select the Install
    New Component icon.

  4. From the Install Component dialog box, select Add Files.

  5. From the File Open dialog box, browse for the COM server
    DLL and select Open.

    The Files To Install list is updated showing the PowerBuilder
    COM server DLL name as well as components and typelib indicating
    that components and the embedded type library were found. The Components
    Found list displays each component found in the server—for
    example, PB90.MyComponent.1.

  6. Click Finish.

proc.gif To set MTS component transaction properties:

  1. Select one of the component folders.

  2. Select Properties from the pop-up menu.

  3. From the Component Properties dialog box, select the
    Transaction tab and set the attribute you want.

proc.gif To verify interfaces and methods:

  1. For each component, select and expand the interfaces
    and methods folders and verify the correct interface names and methods.

Create the client deployment file

proc.gif To create an MTS client deployment file:

  1. Select the Package folder you want to export.

  2. Select Export from the pop-up menu.

  3. From the Export dialog box, select a destination directory
    for the exported package—for example, C:MTSPACKAGES.

    This creates two files with the extensions PAK and EXE. The
    executable file is the client deployment file.

Install the client deployment file

proc.gif To install the MTS client deployment file:

  1. Copy the client deployment file to the client
    computer.

  2. Execute the client deployment file.

The deployment file registers all MTS components as remote
objects running on the designated MTS server computer. Your client
application can now create and execute the MTS components using
the appropriate component names.

note.gif About server location If you move the server to a different computer, you need to
update registry information on the client.


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