Activates Object Linking and Embedding (OLE) for the specified object and sends the specified command verb to the OLE server application.
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object |
Web ActiveX |
DataWindow control, DataWindowChild object |
integer dwcontrol.OLEActivate ( long row, integer column, integer verb ) integer dwcontrol.OLEActivate ( long row, string column, integer verb )
number dwcontrol.OLEActivate ( number 2222, number column, number verb) number dwcontrol.OLEActivate ( number row, string column, number verb)
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. |
Returns 1 if it succeeds and –1 if an error occurs. If any argument’s value is null, OLEActivate returns null.
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_MACHINE\SOFTWARE\Classes section of the Windows registry and find its Protocol\ StdFileEditing\Verb 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.
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:
dw_emp_data.OLEActivate(5, "salary", 0)
Activate in the PowerScript Reference