Page 255
·Oracle*Terminal Resource File | The name of the Oracle File that contains the terminal settings. |
·Run in Debug Mode | Checking this box causes the form to be run in debug mode. This mode causes messages to occur when certain events occur.|
·Write Input Keystroke to file | This field contains the name of the file that will hold the input keystrokes. This file is only populated when the application is run in debug mode. |
·Read Input Keystrokes From File | This field contains the name of the file that holds the keystrokes to be used as input to testing while in the debug mode. |
NOTE |
At this point, you may want to use Oracle Forms Runtime to execute the EMPLOYEE.FMX form.n |
Forms can also be launched by using a command line expression. This is the more common way of launching the applications when they are in production. The launch command is tied to an icon. Double-clicking the icon causes the Forms Runtime to be launched along with the application. Figure 11.4 illustrates the command line syntax and an example of a command expression that executes the Employee form from the DOS prompt. When the userid and password are included in the command line expression, the Runtime Options Dialog will not be displayed when the application is launched.
FIG. 11.4
Command Line
expression to launch
a form.
Page 256
When a form file is executed by using Forms Runtime, three operating modes are available. These are: input, change, and query. It is very important to understand the differences between the modes and how to identify the differences. One of the first problems users unfamiliar with Oracle Forms encounter is entering data in the wrong mode and losing the data.
The form input mode is used when the user is creating a new record. It is the default mode when the form is initially launched. The form is entirely blank at the time and there isn't a message on the bottom of the screen prompting the user to enter query data. Values entered into this screen will be inserted into the database as a new record. Figure 11.5 illustrates the Employee form as it would appear in the input mode.
FIG. 11.5
The Employee Form in
the Input mode.
The Form is in the query mode when it prompts the user for record selection information. Before a specific record or set of records can be presented on the screen, the user must enter a value(s) into a field(s) on the screen. The form will attempt to match database records with these values and retrieve them to the form.
When your form is initially in the query mode, all of the fields will be blank. In addition, the following message will be displayed in the status line at the bottom of the screen: Enter a query; press F8 to execute, Ctrl+q to cancel. This message is prompting the user to enter data and execute a query by pressing the F8 key. Figure 11.6 displays the Employee form in the query mode.
NOTE |
The form in Figure 11.5 and the form in Figure 11.6 are very similar looking. The only difference is the message displayed during the query mode (Figure 11.6). This is the cause of many errors. Users often think the screen is in the input mode when it is in the query mode. They |
Page 257
|
FIG. 11.6
The Employee Form in
the Query mode
displaying the "Enter
Query" message.
When the F8 key is pressed, the form will dynamically create a select statement and retrieve the specified record(s). The form is in the change mode when it is displaying records. Values that are contained on the form can be changed. This mode is differentiated by the other modes in that the form contains values. The forms are blank in the other modes. Figure 11.7 illustrates the Employee form in the Change mode.
FIG. 11.7
The Employee Form in
the Change mode.
It is possible for a form to be in multiple modes at the same time. In Figure 11.7, the middle and bottom sections are in both the change and input modes. The records with values are in the change mode and the blank records below them are in the input mode.
Page 258
Oracle has provided a form with a large variety of functions that are executed by pressing a keyboard key. These keys are called function keys (see Figure 11.8). A dialog box listing the various function keys can be viewed by pressing the Ctrl + F1 key combination.
FIG. 11.8
Function Keys dialog
box displaying the
various function keys.
These keys perform a number of important functions. For instance, the F7 key places the form in the query mode, and F8 completes or executes the query. Each function key listed in the dialog box is actually a subprogram developed by Oracle. The function key name is the same as the name of the subprogram the key launches. Appendix A, "Built-In Subprograms," may be used to obtain a better description of the function keys.
CAUTION |
The function key designations used in this book are the default keys. It is possible to change these by using the Oracle*Terminal product. The function keys may not match this key designation if your company has elected to change the defaults. |
Oracle Forms' ability to query records is one of its most powerful features. Each field on the form is a search field. This means a value can be placed into the item and the form will return records that match the entered value. When the form executes a query against the database, the form dynamically creates an SQL select statement. Each item that contains a value is placed in the where clause of the statement.
Performing a query on the form consists of retrieving the records from the database and placing them on the form. To perform a query, place the form into the query mode, enter a value(s) into an item(s), and finally execute the query.