A script-enabled browser is required for this page to function properly.

EXEC TOOLS SET Statement

An EXEC TOOLS SET statement sends a value from an Oracle Precompiler foreign function to Oracle Forms. Specifically, it places the value of a constant or the value of a host language variable into a Oracle Forms item or variable.

Any value that an EXEC TOOLS SET statement passes to a form item displays after the foreign function returns processing control to the form that called the foreign function (providing, of course, that the item has the Enabled item property set to Yes).

Syntax

EXEC TOOLS SET form_variable[, ...]
VALUES ({:host_variable | constant}[, ...]);

where:

Variable Description
form_variable Specifies the name of the Oracle Forms item or variable into which you are reading a value
host_variable Specifies the name of the host language variable from which you are reading a value.
constant Specifies the constant that you are reading. Do not precede a constant with a colon.

Notes:

The form_variable can be a reference to any of the following items:

Refer to the Programmer's Guide to the Oracle Precompilers for any restrictions on host language variables.

Represent host variables and constants in standard SQL format:

Value

Result

:holder1 

Inserts the value of the host variable, holder1 (preceded by a semi-colon).

'Summit Sporting Goods' 

Inserts the constant string value, Summit Sporting Goods (enclosed in single quotes).

413 

Inserts the constant numeric value, 413 (no quotes for numeric values).

EXEC TOOLS SET statement: Examples

/*
** Example: Write 'SMITH' into emp.ename
*/

EXEC SQL BEGIN DECLARE SECTION;
char itm_buff[255]; /*buffer for item value */
VARCHAR itm_name[255]; /* Forms item name */
EXEC SQL END DECLARE SECTION;
strcpy(itm_name.arr,"EMP.ENAME");
itm_name.len = strlen("EMP.ENAME");
strcpy(itm_buff,"SMITH");
EXEC TOOLS SET :itm_name
VALUES (:itm_buff);