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

Supported

OLEControl control

OLECustomControl control

Unsupported

OLE Control of DataWindow

OLE objects

Supported

OLEObject object

OLEStorage object

OLEStream object

Unsupported

OLERuntimeError

OLERuntime

OLETxnObject

Large Binary/Text database

OLE Object of DataWindow

Calling OLE object functions

Requirements

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

Unsupported

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

    OleObject.function1.function2()
  2. The OLE object method cannot contain reference parameters.

Shortcut

Unsupported

Using shortcuts in the OLECustomControl control are unsupported.

Requirements for client environment

Requirements

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.