Oracle Forms

Introduction
Oracle Forms, a component of the Oracle Developer Suite, is Oracle's long-established technology to design and build enterprise applications quickly and efficiently. With a large and active customer base supporting mission-critical, Forms-based applications—including Oracle's own E-Business Suite—Oracle will support and improve upon Forms technology for many years to come.

Important to know:
 * DDL - Data Definition Language
 * DML - Data Manipulation Language

Links

 * Oracle Forms
 * Documentation

Configuring Oracle Forms

 * In the windows registry we can change the location of the libraries (PLL files). The registry key is called ORA9_PATH.
 * The configuration file is very important because it stores information about window size, network port and other characteristics of Oracle Forms.

Fast Initialization
You can speed up the login process and start Oracle Forms quickly if you create a desktop shortcut in your desktop area or any preferred place. After this click on the properties of this icon and set the username and password. Example: D:\OraHome\bin\ifbld90.exe userid=myuser/myschema@myserver

In the field "Start in" write the path where the project Forms are located.

Variables
The utilization of variables in Oracle Forms is described in the help on-line. Look for Comparison of Global, Parameters, and Package Variables.

Arrays
Example: TYPE ARRAY_ID_TYPE IS TABLE OF NUMBER NOT NULL INDEX BY BINARY_INTEGER; TYPE ARRAY_NAME_TYPE IS TABLE OF VARCHAR2(100) INDEX BY BINARY_INTEGER;

Sequence
Example:

v_nNextID NUMBER; SELECT seq_adm_tree.NEXTVAL INTO  v_nNextID FROM  DUAL;

FOR LOOP
Syntax: FOR  IN .. LOOP END LOOP;

While
Syntax: WHILE LOOP END LOOP;

CURSOR LOOP
Example:

DECLARE CURSOR C1    IS SELECT * FROM Funcionarios; VEZES        NUMBER := 0; MSG          VARCHAR (100); BEGIN FOR RC1 IN C1 LOOP VEZES := VEZES +1; END LOOP; MSG := ’VEZES = ’ || VEZES; MESSAGE (MSG); END;

The record (RC1) above is declared implicitly by Oracle as a register of type  %ROWTYPE  and will not exist after the end of the loop.

Error Handling
The error handling in Oracle Forms is implemented inside a block BEGIN – END. Therefore you can have an intern block using an error handling and another externally block that also has an error handling.

Below is shown an example of error handling that shall be inside of a block BEGIN – END.

EXCEPTION WHEN NO_DATA_FOUND THEN ; WHEN 40100 THEN ; WHEN OTHERS THEN ;

Existing constant values for errors are defined in Oracle Forms (consult pages 294 and 295).

Oracle Forms is used to develop web applications. This articles describes how to use the most common commands and situation in PL/SQL for Oracle Forms. 