Notes
Slide Show
Outline
1
Creating Oracle Data Block Forms
  • Chapter 6 Lesson A
  • Dr. Sadhwani
2
Forms
  • Application with a graphical user interface that looks like a paper form (Uses Form Builder Utility)
  • Used to insert, update, delete and view database (Tables) data. User must connect to Database to execute these functions
3
Primary Form Uses
  • Viewing/retrieving records
  • Inserting/updating/deleting records
  • Counting the number of records a query will retrieve
4
Data Block Forms
  • Form associated with a specific Oracle database table
  • Form wizards are used to create Form Blocks (GUI Interface)
  • With Wizards, System automatically creates:
    • Text fields associated with table fields
    • Programs for inserting, modifying, deleting, and viewing data records


5
Data Block Form
6
Form Modes
  • Normal
    • You can view records and sequentially step through records (Like in Access)
  • Enter Query
    • You can enter search parameters in form fields and then retrieve the associated records
    • To place the form in Enter Query mode, click the Enter Query button
7
Inserting New Records (Icons)
  • In Normal mode, click the Insert Record button      to insert a new blank record
  • Type the data values in the form fields
  • Click the Save button      to save the values in the database
8
Retrieving Records
  • Click the Enter Query button       to place the form in Enter Query mode
  • Type a search condition
  • Click the Execute Query button   to retrieve selected records
    • If you click       , do not enter a search condition, and then click      , all table records will be retrieved
9
Form Search Types
  • Exact search:  only retrieves records that exactly match the entered search condition
  • Restricted search:  retrieves records that fall within a range of values
10
Restricted Search Operators
  • _:  wildcard replacing a single character
  • %:  wildcard replacing multiple characters
  • >, <:  greater than, less than
  • >=, <=:  greater than or equal to, less than or equal to
  • <> or !=:  not equal to
11
Scrolling Through Retrieved Records
  • To view the next record, click the Next Record button
  • To view the previous record, click the Previous Record button
12
Updating and Deleting Records
  • Retrieve the record to be updated or deleted
    • To update, change the data value and click the Save button
    • To delete, click the Remove Record button
13
Data Block Form File Types
  • .fmb
    • Form design file, used by form programmer in Form Builder
  • .fmx
    • Form executable file, run by form users


14
Form Components
  • Form module:  form application
  • Form window
    • Title bar on top
    • Horizontal and vertical scrollbars
    • Can be resized, maximized, minimized


15
Form Components
  • Canvas
    • Surface that displays form items
  • Block
    • Object that contains form items
  • Form items
    • Command buttons, radio (option) buttons, text items
    • Items in the same block can appear on different canvases
16
Form Components
17
Creating a Data Block Form
  • Steps:
    • 1.  Create the data block using the Data Block Wizard
    • 2.  Create the form layout using the Layout Wizard


18
Data Block Wizard
  • Welcome page (Wizard guides the steps)
  • Type page
    • Select table or view on which to base the block source
  • Table page
    • Select table associated with form
  • Finish page
    • Option to use the Layout Wizard to automate creating the layout


19
Layout Wizard
    • Canvas page
      • Select the canvas where the block is displayed
    • Data Block page
      • Select the fields that are displayed on the layout
    • Items page
      • Specify the column labels, heights and widths
    • Style page
      • Specify to create a form- or tabular-style layout


20
Layout Styles
  • Form style
    • One record appears on the form at a time
  • Tabular style
    • Multiple records display on the form in a table
21
Form Builder Wizards
Are Re-entrant
  • You can select a block or layout, then re-enter it and modify its properties using the Wizard
  • A Wizard is in re-entrant mode when its pages appear as tabs
22
Form Builder
Object Navigator Window
  • Shows form objects
  • Allows developer to access form objects
  • Object Navigator has 2 views
    • Ownership view:  shows form objects as a flat list
    • Visual view:  hierarchical relationships between objects
23
Guidelines For Configuring Form Windows
    • Change the window title
    • Allow user to minimize the window
    • Do not allow the user to maximize the window
    • Do not allow the user to resize the window
    • Include horizontal and vertical scrollbars if items appear beyond window boundaries
    • Make the form window fill the Forms Runtime window
24
Configuring Form Windows