0847-0848

Previous Table of Contents Next

Page 847

By default, Oracle Forms displays a hint in the lower-left area of the screen based on the context of the designer. By selecting the next checkbox, Suppress Hints, you suppress these hints. If you check the next option, Run Modules Asynchronously, the Forms Designer enables you to run a form module and work in the designer simultaneously . Otherwise, you must exit the runtime form before using the designer further. The last checkbox defines the editor that should be used in the designer. Checking this box causes the designer to use an operating system editor rather than the default forms editor. (In a Windows 3.x or Windows 95/NT environment, the default forms editor operates similarly to notepad.exe.)

The color palette determines the colors that should be used in a form. It is recommended that you use the Oracle 16-color palette, as shown in Figure 35.3, to ensure color-matching capability between form objects. You use the Color Palette Mode to define how color palettes should be handled in Oracle Forms. The options for the list box are: Editable, Read Only_Shared, and Read Only_Private. Editable means that the color palette of the active form replaces the system color palette, causing the active form to be shown accurately while the appearance of any inactive forms might not be accurate. Read Only_Shared means that each form's color palette is appended to the system palette until the space reserved for the palette becomes full. If you open any forms that use a different color palette, they might not appear accurately. Finally, Read Only_Private operates the same as shared mode except that Oracle Forms ensures that the palette used is always valid for the active form, and any inactive forms might not appear correctly because their color palettes were cleared to make room for the new form.

The Module Access options define whether modules should be opened from the database or the file system (or both) and what types of files should be included in the selection. The last option defines the printer that should be used for any printing requirements in the Forms Designer.

You use the second tab in this window (shown in Figure 35.4) to define the options to be used when a module is run from the Oracle Forms Designer. The first option, Buffer Records in File, causes Forms to buffer only the minimum number of records (the number of records displayed plus three) in memory. All additional rows retrieved are stored in a temporary file. The next option causes the form to be executed in debug mode. This option lets you insert break statements in the PL/SQL segments to observe the values in form items and to trace the execution of the program code.

Figure 35.4.
Setting Oracle Forms
runtime options.


Page 848

The next four options are related to performance tuning of Oracle Forms. Array Processing allows the form to return multiple rows from the database in a single fetch cycle rather than one at a time. This usually causes better performance; however, fetching more than one row at a time might impact the memory usage in the form. To maintain backward compatibility, Oracle Forms allows you to use version 2-style triggers (separate processing steps) in the form. The Optimize SQL Processing option causes these triggers to be processed using an optimization technique to take advantage of the more "modern" capabilities that are incorporated into PL/SQL. Optimize Transaction Mode Processing causes all implicit SQL statements (for example, posting and committing triggers) to optimize cursor usage so that the cursors can be shared within the form. The Statistics option returns statistics regarding cursors and other resource utilization when the form is run. The other effect of this option is that a SQL*Trace session is generated, which you can analyze with TKPROF or another performance-analysis tool to assist with tuning.

The next option displays the block menu for a formrather than the form itselfas soon as the form starts. This menu allows you to navigate directly to a particular block rather than to the initial default. Query Only Mode disables any inserts , deletes, or updates in a form.
Finally, Quiet Mode "turns off" the audible beep that is played whenever a message is generated in the form.

Creating New Forms Modules

You can create a form using File New Form or by using the create-form hotkey (Ctrl+Y). The new form is added to the Object Navigator. Additionally, whenever the Oracle Forms Designer starts, a new empty form is automatically created. Similarly, you can also create program-unit libraries (Ctrl+I) and menu modules (Ctrl+E) from the menu. You can in turn save these modules either by running them (with the appropriate options selected) or by explicitly executing a save from the File menu or using the iconic button in the designer windows.

Building a Simple Default Form

Oracle Forms' feature of intelligent defaulting allows you to create a basic form in mere minutes. As an example, you can quickly create the Warehouse Maintenance form (shown in Figure 35.5) without writing a single line of program code.

To build this form, first create a new form in the Object Navigator (log in to the database if you have not already done so) and select the Blocks group within the new form. The block-definition dialog appears as shown in Figure 35.6. This form is based on the WAREHOUSES table (included on the CD-ROM); therefore, enter it into the base table field and navigate to the next field using the Tab key. (Alternatively, you can obtain the table name using the Select button to the right of the table name field. Clicking this button presents a dialog that you can use to list all the available tables in the database.) Notice that by default the name of the block changes to match the table name, although the name can be any value you want. Hit the Tab key again to navigate to the canvas field, which defaults to a value such as CANVAS1. Change the name of this field to WH_CANVAS.

Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net