setData

setData(bin: Binary) updating;

The setData method of the OleObject class stores the COM data into the object.

To cause an OleControl to load this COM data, call both the oleObject.setData method followed by the loadFromDB methods for the OleControl object.

The setData method sets the OLE data only.

Use the copy method of the OleObject class to copy from one OLE object to another. The copy method copies the data for the object as well as the full name and short names.

The code fragment in the following example shows the use of the setData method.

foreach obj in ReviewOLEObj.instances do
    count := 1 + count;
    if count = 1 then
        oleReview2.oleObject.setData(obj.bin);
        oleReview1.loadFromDB;
    elseif count = 2 then
        oleReview2.oleObject.setData(obj.bin);
        oleReview2.loadFromDB;
    elseif count = 3 then
        oleReview2.oleObject.setData(obj.bin);
        oleReview3.loadFromDB;
    endif;
endforeach;