Page 252
This block is the top section and displays one record from the employee table. The second and third sections below the master block are called detail blocks. The middle block is linked to the Tools table and is displaying three records. The bottom block is linked to the Glasses table and displays one record even though it has the potential to display four records at a time. Blocks have the ability to display one or more records.
The top block is a master block because it determines the records in the associated detail blocks. This means the records in the detail blocks are related to the record in the master block in a one-to-many relationship. In the form example, the middle and bottom blocks display tool and eyeglass records for the employee in the master block.
The final portion of the form is an optional button palette located at the bottom of the screen. It consists of a series of push buttons that perform specific functions. Oracle Forms create a default button palette if the developer desires. The default buttons are the first six from the left on the form. The buttons perform the functions described in Table 11.1.
Table 11.1 Default Button Functions
Button Label | Description |
<< | Causes the form to display a previously displayed set of records when the input focus is in a multiple record block. |
< | Causes the form to display the previously displayed record for the block that contains the input focus. |
> | Causes the form to display the next record from a set of retrieved records for the block that contains the input focus. |
>> | Causes the form to display the next set of retrieve records for the block that contains the input focus. |
Query | Causes the form to clear the form of values and place it in the query mode when the form is in the input or query mode. It executes aquery or retrieves the specified records when the form is in the query mode. |
Save | Causes the form to permanently save any changes that occurred on the form. |
Three Oracle Forms 4.5 applications are of interest in the Developer 2000 folder. These are as follows:
·Forms Designer | This is the Forms Development application software. It is used to create and maintain the Forms source code. It also has the ability to create the compiled or executable Forms code. |
·Forms Generate | This software is used to generate or create the Forms executable code from the Forms source code. |
Page 253
·Forms Runtime | This software is used to launch or execute the Forms executable code. |
Figure 11.2 illustrates the Developer 2000 Group Icons. The icons used to launch the three Forms products are contained in this group.
FIG. 11.2
The Developer 2000
Icons used to launch
the various products.
Oracle Forms Designer is the main Forms development product, used to create the source or readable code. Source code cannot be executed. It is the code that the developer can read. It must be turned into machine or executable code. Executable or machine code is not readable by developers. Executable code is created by generating or compiling the source code. Although the source code may be generated by using the Oracle Forms Designer product or the Forms Generate product, it is usually done within Forms Designer. A Forms application is executed by using the Forms Runtime product. This is the only product that understands the Forms executable file. The Forms Runtime application can also be launched from Forms Designer.
Oracle Forms uses three types of modules or files: form, menu, and library. The form file contains the code for a GUI application such as that in Figure 11.1. The menu module contains the code for the menu. A library file is a collection of subprograms. These include procedures, functions, and packages. Table 11.2 describes the file extensions for the various form, menu, and library modules.
Table 11.2 Oracle Forms File Type Extensions
Extension | Description |
.FMB | This is a binary file that contains the Form source code. It is the only type of form file that Forms designer can read. |
.FMT | This type of file is a version of an .FMB file that can be read and modified by using an editor other than Forms Designer. |
.FMX | This type of file contains the Form executable code. Generating the Form .FMB file creates this type of file. It is the only type of file that may be used by Forms Runtime. |
.MMB | This is a binary file that contains the Menu source code. It is the only type of menu file that Forms designer can read. |
Page 254
Table 11.2 Continued
Extension | Description |
.MMT | This type of file is a version of an .MMB file that can be read and modified by using an editor other than Forms Designer. |
.MMX | This type of file contains the Menu executable code. Generating the menu .MMB file creates this type of file. It is the only type of file that may be used by Forms Runtime. |
.PLL | This is a binary file that contains the Library source code. |
.PLD | This type of file is a version of a .PLL file that can be read and modified by using an editor other than Forms Designer. |
.PLX | This type of file contains the Library executable code. Generating the library .PLL file creates this type of file. |
Forms Runtime can be launched by double-clicking the Forms Runtime icon in the Developer 2000 icon group. When this is performed, the Forms Runform Options dialog box appears, as shown in Figure 11.3. The top box contains the name of the executable (.FMX) file that is to be executed. The browse button adjacent to the field opens a File Open dialog box that can be used to identify the name of the file to be placed in the field.
FIG. 11.3
The Forms Runform
Option dialog box used
to launch aform.
Other important fields in the dialog box are as follows:
·Userid |
The name of the User Account I.D. that can access the Oracle7 or Oracle8 database. |
·Password | The password for the Oracle User Account ID |
·Database |
The name and location of the database. This is sometimes called a connect or host string. |