About the Web ActiveX – PB Docs 126

About the Web ActiveX


The SAP DataWindow Web control for ActiveX is a fully interactive DataWindow
control for use with Microsoft Internet Explorer. It implements
all standard DataWindow features except rich text.

The Web ActiveX supports data retrieval with retrieval arguments
and data update. You can use edit styles, display formats, and validation
rules. Most of the standard methods for manipulating the DataWindow
are available, including Modify for changing DataWindow object properties. Several
functions that involve file system interactions, such as SaveAs and
SaveAsAscii, are not supported, allowing the Web ActiveX to be in the safely
category of ActiveX controls.

Included with the Web ActiveX is the SAP DataWindow Transaction
Object control for making database connections that can be shared
by several Web ActiveX controls.

note.png Browser support

The Web ActiveX and Transaction Object control are designed
to work in browsers that support ActiveX controls, such as Microsoft
Internet Explorer version 3 and higher.

The DataWindow controls are not designed to work in Netscape
browsers, which do not support ActiveX controls. Even if you use
third-party plug-ins to enable ActiveX support, scripting for the
controls works differently and is not tested.

Development environment

When you install PowerBuilder, the Setup program registers
the Web ActiveX and the Transaction Object controls in the Windows
registry. The class information entered in the registry is visible
in the PowerBuilder Browser under OLE Custom Controls on the OLE
tab. You can also examine the properties, events, and methods of
the controls on the OLE tab of the Browser.

To use the Web ActiveX, your development system must meet
the following requirements, all of which are met when you install
any PowerBuilder component that requires the Java VM:

  • The Oracle JRE 1.2 or later
    must be installed on your system

  • The path to the jvm.dll file
    must be in your system PATH environment variable

    The path is …JREinclient for
    JRE 1.4 and ...JREinclassic for
    1.2 or 1.3

  • The following files must be in a directory in your
    system PATH environment variable: pbjvm126.dll, pbshr126.dll,
    and pbjdbc12126.jar

  • If you are using Internet Infomation Services (IIS)
    6.0, you need to configure IIS to recognize the .pbl,
    .pbd, and .psr extensions
    as MIME types. See “Adding MIME types to IIS

In addition, the Java classes required by your database vendor’s
client layer must be installed on your system.

For information about the required HTML, see “HTML for inserting the controls
on a Web page”

DataWindow objects

The Web ActiveX uses a DataWindow object, which determines
what data is retrieved and how it is displayed. The Web ActiveX
can also display Powersoft reports (PSRs), which do not need to
retrieve data. A DataWindow object for the Web ActiveX can have
any presentation style except RichText.

DataWindow objects are stored in PowerBuilder libraries (PBLs) or PowerBuilder dynamic libraries
(PBDs). The DataWindow libraries are stored on the Web server and
downloaded as needed by the Internet Explorer browser. You use a
URL to point to the library. It can be relative or absolute, using
any supported protocol—for example, http, ftp, or file.

For more information, see “DataWindow objects for the
Web ActiveX”

Adding MIME types to IIS

To use the Web ActiveX with IIS 6.0, which is the IIS version
included in Windows Server 2003, you need to configure IIS to recognize
the .pbl, .pbd, and .psr extensions.
Previous versions of IIS include a wildcard character MIME mapping
that allows IIS to serve any file.

You must be a member of the Administrators group on the local
computer to perform the following procedure, or you must have been
delegated the appropriate authority. For more information, see the
Microsoft documentation for IIS 6.0 or this Microsoft support document

proc.png To add a global MIME type to IIS 6.0:

  1. In IIS Manager, right-click the computer
    on which you want to add a MIME type, and click Properties.

  2. Click MIME Types.

  3. Click New.

  4. In the Extension box, type pbl.

  5. In the MIME type box, type application/octet–stream.

  6. Repeat steps 4 and 5 for the .pbd and
    .psr extensions, using application/octet-stream and application/datawindow respectively
    as the MIME types.

  7. Click OK.

  8. Restart IIS to apply the new settings.

You can also add a MIME type to a specific Web site or directory
from its HTTP Headers property page.

Database connections

The Web ActiveX uses JDBC for database connectivity. Users
can connect to a data source on any server to which they have access,
including databases and middle-tier servers on the Internet.

You can use internal transaction properties for specifying
a connection; or you can make the connection with a separate Transaction
object, the SAP DataWindow Transaction Object control. When you
connect using a separate transaction object, you can control when
SQL COMMIT and ROLLBACK statements
occur and you can use the same connection for multiple Web ActiveX

For more information, see “Using the DataWindow Transaction
Object control”


Since the Web ActiveX is designed for Internet Explorer, you
can use Jscript or another ECMAScript-compatible scripting language
for scripting purposes.

In general, you can use the same methods as in a PowerBuilder
application. However, there are a few differences:

  • Datatypes are mapped to the basic JavaScript types of string,
    number, boolean, and various object types

  • ECMAScript languages do not support arguments passed
    by reference; so instead of checking the value of a reference argument,
    you call a separate method to retrieve the value

  • Enumerated datatypes are not supported; instead,
    specify the integer that corresponds to the enumerated data value

For more information, see “Coding for the Web ActiveX”.


The Web ActiveX supports the same events as a standard DataWindow
control, with these differences:

  • Event names
    are different to conform to Web conventions

  • Events in ECMAScript languages do not have return
    values; instead you can call SetActionCode to
    affect the outcome of an event


The Web ActiveX is provided as a CAB file, which allows the
client browser to install and register the control. When the user
downloads a Web page that refers to the CAB file, the browser also
downloads the CAB file if necessary, unpacks it, and registers the
control. Some additional files must also be deployed to the client.

For more information, see “Deploying the Web ActiveX”.

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