11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INITIALIZE_CONTAINER built-in<br />

Description<br />

Inserts an OLE object from a server-compatible file into an OLE container.<br />

Syntax<br />

PROCEDURE INITIALIZE_CONTAINER<br />

(item_id Item,<br />

file_name VARCHAR2);<br />

PROCEDURE INITIALIZE_CONTAINER<br />

(item_name VARCHAR2,<br />

file_name VARCHAR2);<br />

Built-in Type unrestricted procedure<br />

Enter Query Mode no<br />

Parameters<br />

item_id Specifies the unique ID that <strong>Form</strong> <strong>Builder</strong> assigns to the item when created.<br />

Use the FIND_ITEM built-in to return the ID to an appropriately typed<br />

variable. The data type of the ID is Item.<br />

item_name Specifies the name of the object created at design time. The data type of<br />

the name is VARCHAR2 string.<br />

file_name Specifies the name of the file containing the object for insertion into an<br />

OLE container. Include the path of the file location.<br />

INITIALIZE_CONTAINER restrictions<br />

Valid only on Microsoft Windows and Macintosh.<br />

INITIALIZE_CONTAINER examples<br />

/* Built-in: INITIALIZE_CONTAINER<br />

** Example: Initializes an OLE container by inserting an object<br />

** from a specified file into an OLE container.<br />

** trigger: When-Button-Pressed<br />

*/<br />

DECLARE<br />

item_id ITEM;<br />

item_name VARCHAR(25) := ’OLEITM’;<br />

BEGIN<br />

item_id := Find_Item(item_name);<br />

IF Id_Null(item_id) THEN<br />

message(’No such item: ’||item_name);<br />

ELSE<br />

Initialize_Container(item_id,’c:\OLE\oleobj.xls’);<br />

END IF;<br />

END;<br />

261

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!