Sets data in the OLE server associated with an OLE control using Uniform Data Transfer.
OLE controls and OLE custom controls
olename.SetData ( clipboardformat, data )
Argument  | 
Description  | 
|---|---|
olename  | 
The name of the OLE or custom control associated with the OLE server to which you want to transfer data.  | 
clipboardformat  | 
The format of the data. You can specify a standard format with a value of the ClipboardFormat enumerated datatype. You can specify a nonstandard format as a string.Values for ClipboardFormat are: 
 
 If clipboardformat is an empty string or a null value, SetData transfers the data with the format ClipFormatText!.  | 
data  | 
A string or blob whose value is the data you want to transfer.  | 
Integer. Returns 0 if it succeeds and -1 if an error occurs.
SetData returns an error if you specify a clipboard format that the OLE server does not support. See the documentation for the OLE server to find out what formats it supports.
SetData operates via Uniform Data Transfer, a mechanism defined by Microsoft for exchanging data with container applications. PowerBuilder enables data transfer via a global handle. The OLE server must also support data transfer via a global handle. If it does not, you cannot transfer data to or from that server.
For an example of moving data between two OLE controls (a Microsoft Word table and a Microsoft Graph), see GetData.