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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SERVER_ACTIVE built-in<br />

Description<br />

Indicates whether or not the server associated with a given container is running: Returns TRUE if the<br />

OLE server is running, FALSE if the OLE server is not running. You must define an appropriately typed<br />

variable to accept the return value.<br />

Syntax<br />

FUNCTION SERVER_ACTIVE<br />

(item_id Item);<br />

FUNCTION SERVER_ACTIVE<br />

(item_name VARCHAR2);<br />

Returns BOOLEAN<br />

Built-in Type unrestricted function<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 />

SERVER_ACTIVE restrictions<br />

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

SERVER_ACTIVE examples<br />

/*<br />

** Built-in: SERVER_ACTIVE<br />

** Example: Checks to see if the OLE server is active.<br />

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

*/<br />

DECLARE<br />

item_id ITEM;<br />

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

active_serv BOOLEAN;<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 />

active_serv := <strong><strong>Form</strong>s</strong>_OLE.Server_Active(item_id);<br />

IF active_serv = FALSE THEN<br />

<strong><strong>Form</strong>s</strong>_OLE.Activate_Server(item_id);<br />

END IF;<br />

END IF;<br />

END;<br />

357

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

Saved successfully!

Ooh no, something went wrong!