Connecting to a COM server – PB Docs 70

Connecting to a COM server

To access a method associated with a component in the COM
server, the PowerBuilder client connects to the component using
its programmatic identifier (ProgID) or its class identifier (CLSID).

You can use a tool such as OLEVIEW or the OLE tab in the PowerBuilder Browser
to view the Program ID or CLSID and methods of registered PowerBuilder
COM objects.

To establish a connection to the COM server, you need to execute
the PowerScript statements required to perform these operations:

  1. Declare a variable of type
    OLEObject and use the Create statement to instantiate it.
  2. Connect to the object using its Program ID or CLSID.
  3. Check that the connection was established.

Example The following script instantiates the EmpObj OLEObject object, connects
to the PowerBuilder COM object PB70.Employee, and checks for errors:

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x