OLEActivate – PB Docs 150

OLEActivate method (DataWindows)

Description

Activates Object Linking and Embedding (OLE) for the specified
object and sends the specified command verb to the OLE server application.

Controls

DataWindow type

Method applies to

PowerBuilder

DataWindow control, DataWindowChild object

Web ActiveX

DataWindow control, DataWindowChild object

Syntax

[PowerBuilder]

[Web ActiveX]

Argument

Description

dwcontrol

A reference to a DataWindow control or
child DataWindow.

row

A long identifying the row location of
the Database Blob control in the DataWindow object.

column

The column location of the Database Blob. Column can
be a column number (integer) or a column name (string).

verb

Usually 0, but the verb is dependent
on the OLE server.

Return Values

Returns 1 if it succeeds and –1 if an error occurs.
If any argument’s value is null, OLEActivate returns
null.

Usage

The user can activate OLE by double-clicking an OLE blob column
in a DataWindow. Use OLEActivate when you want
to activate OLE in response to some other event or action—for
example, when the user clicks a button.

The verb you specify determines what action occurs when the
OLE server application is invoked. The default verb (0) generally
means you want to edit the document. Each OLE application has its
own particular set of supported verbs. To find out what verbs the
application supports, consult the documentation for the application,
or look for the application name in the HKEY_LOCAL_MACHINESOFTWAREClasses section
of the Windows registry and find its Protocol StdFileEditingVerb key. For example, the AVIFile
class has three verbs, 0, 1, and 2, for Play, Edit, and Open.

Data for an OLE application is stored in the database as a
Binary/Text Large Object (blob). In SQL Anywhere, the datatype
of the database column is long binary. To make the blob accessible
to users, use the DataWindow painter to set up the blob column.
In the painter, you add an OLE Database Blob object (called TableBlob
in the DataWindow object properties) to the DataWindow object and
specify the OLE server application in the Database Binary/Text
Large Object window.

For setup details, see Application
Techniques
.

Examples

This statement activates OLE for the Database Blob
control in row 5 of the salary column in DataWindow dw_emp_data.
The verb is 0:

See Also

  • Activate in
    the PowerScript Reference


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