Using OLE in an application

OLE, originally an acronym for Object Linking and Embedding, is a facility that allows Windows programs to share data and program functionality. PowerServer supports the use of OLE in three ways:

  • OLE control

  • OLECustomControl

  • OLE object

OLE controls


OLEControl control

OLECustomControl control


OLE Control of DataWindow

OLE objects


OLEObject object

OLEStorage object

OLEStream object





Large Binary/Text database

OLE Object of DataWindow

Calling OLE object functions


Using parentheses when calling an OLEObject method is required, even if the OLEObject method does not require any parameter. For example, when executing the Save function for a Microsoft Word document:

Unsupported script:

o1.ActiveDocument.Save //Unsupported

Supported script:

o1.ActiveDocument.Save() //Supported


  1. OLEObject object does not support cascaded calling. The following example is unsupported:

  2. The OLE object method cannot contain reference parameters.



Using shortcuts in the OLECustomControl control are unsupported.

Requirements for client environment


When an OLE object is called in a deployed application, the location used to store the OLE object on the client should match the location specified in the original PowerBuilder application.

ActiveX control(s), if used in the Web application, should be installed and registered on the client. There are two ways to install and register ActiveX controls:

Manually install and register ActiveX controls that are associated with the Web application.

Deploy ActiveX controls that are associated with the Web application to the PowerServer's web server, so ActiveX controls can be automatically downloaded and registered on the client. For detail information on deploying ActiveX controls to the Web Server, refer to the section called “Additional Files” in PowerServer Toolkit User Guide.