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]
|
1 |
integer <span>dwcontrol</span><span>.OLEActivate </span>( long <span>row</span>, integer <span>column</span>, integer <span>verb</span> )<br>integer <span>dwcontrol</span><span>.OLEActivate </span>( long <span>row</span>, string <span>column</span>, integer <span>verb</span> ) |
[Web ActiveX]
|
1 |
number <span>dwcontrol</span><span>.OLEActivate</span> ( number 2222, number <span>column</span>,<br> number <span>verb</span>)<br>number <span>dwcontrol</span><span>.OLEActivate</span> ( number <span>row</span>, string <span>column</span>,<br> number <span>verb</span>) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
A reference to a DataWindow control or |
|
row |
A long identifying the row location of |
|
column |
The column location of the Database Blob. Column can |
|
verb |
Usually 0, but the verb is dependent |
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:
|
1 |
dw_emp_data.<span>OLEActivate</span>(5, "salary", 0) |
See Also
-
Activate in
the PowerScript Reference