Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Test Bank for Guide to Oracle 10g, 5th Edition: Morrison

Test Bank for Guide to Oracle 10g, 5th Edition:


Morrison

To download the complete and accurate content document, go to:


https://testbankbell.com/download/test-bank-for-guide-to-oracle-10g-5th-edition-morri
son/

Visit TestBankBell.com to get complete for all chapters


Chapter 6: Creating Custom Forms

TRUE/FALSE

1. When you create a custom form, you manually create the form canvas in the Object Navigator.

ANS: T PTS: 1 REF: 404

2. To configure a form button item, you modify the ID property, which is the name that Forms
Builder uses to reference the button.

ANS: F PTS: 1 REF: 419

3. The Forms Debugger is used to find and correct syntax errors.

ANS: F PTS: 1 REF: 427

4. If the triggering event occurs within any block item, the block trigger fires.

ANS: T PTS: 1 REF: 440

5. To display a value in a text item automatically when a form first opens, you set the text item’s
Initial Value property to the desired value.

ANS: T PTS: 1 REF: 416

6. To display an alert to the user, use the SHOW_ALERT subprogram.

ANS: T PTS: 1 REF: 458

7. One way to help users avoid errors is to programmatically disable command buttons.

ANS: T PTS: 1 REF: 465

8. Use the Not NULL property to indicate that a field value is required.

ANS: F PTS: 1 REF: 461

9. To specify the European date format for the Data Type text item property, use EDate.

ANS: T PTS: 1 REF: 461

10. By default, the validation unit for a data form is at the item level.

ANS: T PTS: 1 REF: 463

11. To ensure that a user enters only digits in a postal code field with a character data type, use a Data
Type validator.

ANS: F PTS: 1 REF: 464


12. An item validation trigger is an item-level trigger that you associate with the items
WHEN-VALIDATE-ITEM event.

ANS: T PTS: 1 REF: 464

13. The following code could be used to disable a command button:


SET_ITEM_PROPERTY('UPDATE_BUTTON', ENABLED, PROPERTY_FALSE);

ANS: T PTS: 1 REF: 465

14. The property values used in the SET_ITEM_PROPERTY function are the same as those used in
the Property Palette.

ANS: F PTS: 1 REF: 465

15. To disable a text field so the user cannot modify it, use the SET_ITEM_PROPERTY function to
disable it.

ANS: F PTS: 1 REF: 466

16. It is good practice to intercept the default system error message and replace it with a custom error
message.

ANS: T PTS: 1 REF: 467

17. Whenever an ORA- or FRM- error occurs while a form is running, the WHEN-ERROR event
occurs.

ANS: F PTS: 1 REF: 469

18. The DBMS_ERROR_CODE procedure contains the error code for the most recent FRM- error that
occurred.

ANS: F PTS: 1 REF: 469

19. The error code FRM-40735 indicates that a DBMS error occurred.

ANS: T PTS: 1 REF: 470

20. When a form contains an ON-ERROR trigger and a runtime error occurs, form execution
immediately transfers to the ON-ERROR trigger.

ANS: T PTS: 1 REF: 470

21. If the error does not have an associated error handler in the ON-ERROR trigger, then the standard
error message is displayed rather than a custom message.

ANS: F PTS: 1 REF: 470

22. A data form block cannot be turned into a control block.

ANS: F PTS: 1 REF: 480


23. To convert a data block to a control block, you change the Database Data Block property value to
No.

ANS: T PTS: 1 REF: 480

24. A form may contain either data blocks or control blocks, but not both.

ANS: F PTS: 1 REF: 482

25. When you link a control block to a data block, use the Data Block Wizard to create a master-detail
relationship between the data block and the control block.

ANS: F PTS: 1 REF: 484

26. When you create a form with a master-detail relationship between a control block and a data block,
you must manually specify the link between the blocks.

ANS: T PTS: 1 REF: 484

27. When creating multiple canvases in the same form, multiple developers can each work with one of
the canvases.

ANS: F PTS: 1 REF: 487

28. All data is shared between two canvases stored in separate form files.

ANS: F PTS: 1 REF: 488

29. If working with multiple canvases in the same form, when you create a new data block, you can
select the canvas name on which the block items are to appear on the Layout Wizard Canvas page.

ANS: T PTS: 1 REF: 494

30. When a form contains multiple data blocks and multiple canvases, you must specify which canvas
initially appears when the user runs the form.

ANS: T PTS: 1 REF: 497

MULTIPLE CHOICE

1. What view of Object Navigator should be used when creating a custom form?
a. Ownership View c. Forms View
b. Visual View d. Canvas View
ANS: B PTS: 1 REF: 404

2. A ____ is a data block that you do not associate with a particular database table.
a. data form block c. custom form block
b. control data block d. free form block
ANS: B PTS: 1 REF: 405

3. What system variable displays the operating system date?


a. $$DATE$$ c. $$DBDATE$$
b. $$DATETIME$$ d. $$DBDATETIME$$
ANS: A PTS: 1 REF: 416

4. What type of variable is always available to any form?


a. public variable c. global variable
b. system variable d. form variable
ANS: B PTS: 1 REF: 416

5. Which button event is triggered when a button is pressed?


a. ON-BUTTON-PRESS c. WHEN-BUTTON
b. WHEN-BUTTON-PRESSED d. ON-BUTTON
ANS: B PTS: 1 REF: 420

6. How do you reference a form item within a form trigger?


a. item_name c. block_name.item_name
b. :item_name d. :block_name.item_name
ANS: D PTS: 1 REF: 420

7. What built-in procedure can be used to clear out form values?


a. DELETE_ITEMS c. CLEAR_FORM
b. CLEAR_ITEMS d. EMPTY_FORM
ANS: C PTS: 1 REF: 423

8. What command clears the value from the form item?


a. :receiving_block.color = “”; c. :receiving_block.color.clear;
b. :receiving_block.color = ‘’; d. :receiving_block.color:='';
ANS: B PTS: 1 REF: 425

9. What kind of error occurs when a form is running?


a. syntax error c. user error
b. system error d. runtime error
ANS: D PTS: 1 REF: 427

10. Error messages that are generated by the DBMS begin with the prefix ____.
a. FRM c. DBMS
b. ORA d. DB
ANS: B PTS: 1 REF: 428

11. When using the Forms Debugger, to pause program execution on a certain command, set a ____.
a. stop c. breakpoint
b. break d. pausepoint
ANS: C PTS: 1 REF: 429

12. The ON-DELETE trigger event is an example of a(n) ____ trigger.


a. Interface event c. Navigational
b. Block processing d. Validation
ANS: B PTS: 1 REF: 439
13. What trigger event is part of the Message Handling category?
a. PRE-FORM c. POST-QUERY
b. ON-ERROR d. PRE-INSERT
ANS: B PTS: 1 REF: 439

14. When a trigger is attached to a block, the trigger’s ____ extends to all items within the block.
a. scope c. timing
b. range d. execution hierarchy
ANS: A PTS: 1 REF: 440

15. The currently selected item on a form has the ____.


a. form hilight c. form focus
b. insertion point d. field point
ANS: C PTS: 1 REF: 440

16. Using the GO_ITEM built-in to move the form focus is an example of ____.
a. external navigation c. program navigation
b. internal navigation d. trigger navigation
ANS: B PTS: 1 REF: 440

17. How do you set tab order for a form?


a. arrange items alphabetically in Object Navigator
b. arrange items in desired tab order in Object Navigator
c. set Tab Order property in Property Palette for each item
d. create items in correct order
ANS: B PTS: 1 REF: 441

18. When in a multiple form application, the form focus is moved to another form with the ____
command.
a. GO_ITEM c. TO_FORM
b. GO_BLOCK d. GO_FORM
ANS: D PTS: 1 REF: 442

19. What command moves the form focus to the item name s_id in the shipment block?
a. GO_ITEM(:s_id); c. GO_ITEM(shipment:s_id)
b. GO_ITEM(:shipment.s_id) d. GO_ITEM(shipment.s_id)
ANS: D PTS: 1 REF: 442

20. What error level indicates an informative message that identifies a data entry error, such as
entering an incorrect data value in a text item?
a. 0 c. 10
b. 5 d. 15
ANS: D PTS: 1 REF: 450

21. Which error severity indicates an error message that identifies a condition that causes the form to
operate incorrectly?
a. 10 c. 20
b. 15 d. 25
ANS: D PTS: 1 REF: 450

22. To suppress all error messages with severity below 10, use the code: ____.
a. :SYSTEM.MESSAGE_LEVEL = 10 c. :SYSTEM.MESSAGE_LEVEL = 9
b. :SYSTEM.MESSAGE_LEVEL <= 10 d. :SYSTEM_MESSAGE_LEVEL = 11
ANS: A PTS: 1 REF: 451

23. What is the default value for SYSTEM.MESSAGE_LEVEL?


a. 0 c. 10
b. 5 d. 15
ANS: A PTS: 1 REF: 451

24. What is the maximum number of characters that can be displayed in the message line?
a. 50 c. 200
b. 100 d. 400
ANS: C PTS: 1 REF: 454

25. What message would be best to display in an alert rather than on the message line?
a. Record Saved c. Order processed
b. New Customer Inserted d. Are you sure you want to exit?
ANS: D PTS: 1 REF: 456

26. Which of the following is an appropriate use of the MESSAGE subprogram?


a. Display a message with 300 characters
b. Ask the user a question
c. Get user confirmation
d. Tell the user that a save was successful
ANS: D PTS: 1 REF: 454-455

27. How do you display an alert?


a. Using DISPLAY_ALERT c. Using ALERT
b. Using SHOW_ALERT d. Using POPUP_ALERT
ANS: B PTS: 1 REF: 458

28. What type of value is returned from an alert?


a. NUMBER c. CHAR
b. VARCHAR2 d. NVARCHAR2
ANS: A PTS: 1 REF: 458

29. What property is used to limit the length of an entry in a text item?
a. Max Length c. Length
b. Maximum Length d. Length Limit
ANS: B PTS: 1 REF: 461

30. How do you specify that a text field should contain a right-justified number?
a. Rnumber c. Right Justify Number
b. Right Number d. Rt Justify Number
ANS: A PTS: 1 REF: 462

31. What is the default validation unit in Forms Builder?


a. Form c. Item
b. Block d. Canvas
ANS: C PTS: 1 REF: 463

32. Which event do you associate an item validation trigger with?


a. WHEN-VALIDATE-ITEM c. ON-EXIT
b. VALIDATE-ITEM d. ON-VALIDATION
ANS: A PTS: 1 REF: 464

33. What is meant by nonnavigable?


a. A user cannot place the mouse in the field
b. A user cannot edit the field
c. A user cannot use the tab key to get to the field
d. A user cannot access the form at all
ANS: C PTS: 1 REF: 466

34. Which of the following contains the error message for a FRM error?
a. DBMS_ERROR_CODE c. ERROR_CODE
b. DBMS_ERROR_TEXT d. ERROR_TEXT
ANS: D PTS: 1 REF: 469

35. Which FRM- error indicates that a DBMS error occurred?


a. 00000 c. 40735
b. 23143 d. 88125
ANS: C PTS: 1 REF: 470

36. What determines the first canvas to be displayed in a form with multiple canvases?
a. the first created
b. the first alphabetically
c. the first canvas listed in Object Navigator
d. the canvas with the first data block listed in Object Navigator
ANS: D PTS: 1 REF: 497

37. How do you programmatically move form focus to a different canvas?


a. use the GO_CANVAS command
b. use the GO_ITEM command to move focus to an item in the canvas
c. use the GO_BLOCK command to move focus to a block in the canvas
d. use the Property Palette for the canvas to set the Focus property
ANS: B PTS: 1 REF: 498

38. Use a ____ canvas to direct a user through a sequence of steps for performing a task.
a. content c. tab
b. stacked d. modular
ANS: C PTS: 1 REF: 500
39. How do you create a tab canvas?
a. create a content canvas then a tab canvas on it
b. create a tab canvas only
c. create a stacked canvas then a tab canvas on it
d. create a base canvas then a tab canvas on it
ANS: A PTS: 1 REF: 501

40. How do you specify tab canvas order?


a. order tab pages in Object Navigator
b. order blocks on tabs in Object Navigator
c. set Tab Order property using Property Palette
d. the tab page creation order sets order
ANS: A PTS: 1 REF: 504

COMPLETION

1. A(n) ____________________ form displays the data fields from a variety of database tables, and
contains programs that support organizational processes.

ANS: custom

PTS: 1 REF: 402

2. A (n) ____________________ block is a data block that you do not associate with a particular
database table.

ANS: control data

PTS: 1 REF: 405

3. A(n) ____________________ variable is a variable representing a value that is always available to


any form.

ANS: system

PTS: 1 REF: 416

4. The system variable ____________________ represents the current database server date.

ANS: $$DBDATE$$

PTS: 1 REF: 416

5. You create a command button by drawing the button on the canvas using the
____________________ tool on the tool palette.

ANS: Button

PTS: 1 REF: 418

6. A(n) ____________________ is an error that does not keep a program from compiling, but that
generates an error while the program is running.
ANS: runtime error

PTS: 1 REF: 427

7. When using a debugger, a(n) ____________________ pauses execution on a specific command.

ANS: breakpoint

PTS: 1 REF: 429

8. When using Forms Debugger, a(n) ____________________ is used to monitor the value of a
specific variable or form item value during program execution

ANS: watch

PTS: 1 REF: 432

9. WHEN-BUTTON-PRESSED is an example of a(n) ____________________ event.

ANS: interface

PTS: 1 REF: 439

10. Trigger events that start with ____________________ will fire their associated triggers before the
action.

ANS:
PRE-
PRE

PTS: 1 REF: 439

11. Trigger ____________________ defines which trigger fires when an object within a form object
contains the same trigger that the form object contains.

ANS: execution hierarchy

PTS: 1 REF: 440

12. ____________________ navigation occurs when the user causes the form focus, which specifies
the location of the insertion point, to change by making a different form item active.

ANS: External

PTS: 1 REF: 440

13. To set the ____________________ order of items in a custom form, you place the items in the
correct order under the Items node in the Object Navigator window.

ANS: tab

PTS: 1 REF: 441


14. To move focus to a specific form item, use the ____________________ built-in subprogram.

ANS: GO_ITEM

PTS: 1 REF: 442

15. A message severity level of ____________________ means a condition that keeps a form trigger
from working correctly.

ANS:
20
twenty

PTS: 1 REF: 450

16. Level ____________________ error messages provide information about what is happening and
usually do not require user action.

ANS:
5
five

PTS: 1 REF: 450

17. Forms Builder determines which messages to display on the message line using the
____________________ variable.

ANS: :SYSTEM.MESSAGE_LEVEL

PTS: 1 REF: 451

18. A(n) ____________________ is a short text string that the form developer displays on the form
message line.

ANS: custom message

PTS: 1 REF: 454

19. A(n) ____________________ is a dialog box that can display a longer text message, and displays
one or more buttons that allow the user to select between alternatives that execute associated
program statements.

ANS: alert

PTS: 1 REF: 456

20. The text item validation property ____________________ specifies that the value entered by the
user should be validated against the items LOV.

ANS: Validate From List

PTS: 1 REF: 461


21. ____________________ canvases are multiple-page canvases that allow users to move between
multiple canvas surfaces by selecting tabs at the top of the canvas.

ANS: Tab

PTS: 1 REF: 500

22. A(n) ____________________ is an object representing a surface that displays form items, and has
a tab label identifier at the top.

ANS: tab page

PTS: 1 REF: 500

23. To create a control block, you create a new data block in the ____________________, and specify
that the data block is to be created manually, rather than by using the Data Block Wizard.

ANS: Object Navigator

PTS: 1 REF: 405

24. The ____________________ console allows you to control form execution and examine form
values.

ANS: Forms Debug

PTS: 1 REF: 431

25. To execute alternate program commands depending on the alert button that the user clicks, you
create a(n) ____________________ decision control structure.

ANS: IF/ELSIF

PTS: 1 REF: 458

ESSAY

1. List and describe the properties that can be used to configure a text field.

ANS:
Name—Represents how Forms Builder internally references the item. For items that represent
database fields, this is usually the same name as the database field.
Data Type—Represents the type of data the text item displays.When you create a text item to
represent a database field, the text item must have the same data type as the database field.
Maximum Length—Represents the maximum width of the data that the text item can
display.When you create a text item to represent a database field, the text item should have the
same maximum width as the associated database field, plus any formatting characters that you
include in the text item’s Format Mask property.
Prompt—Represents the label that appears beside the text item.

PTS: 1 REF: 408

2. How can you clear all form values using a form trigger?
ANS:
There are two ways to clear the form text items in a form trigger: use the CLEAR_FORM built-in
procedure, which clears all of the form text items; or you can create a program unit to set the value
of the text items to a blank text string.You use the CLEAR_FORM procedure when you want to
clear all form text items, and you create a program unit when you want to clear selected text items
and retain the current values in other items.

PTS: 1 REF: 423

3. Describe trigger timing.

ANS:
Trigger timing specifies when a trigger fires—just before, during, or after its triggering event.
PRE- triggers, which are triggers with PRE as the first three characters of their name, fire just
before an event successfully completes. For example, a PRE-FORM trigger fires just before a form
appears in the Forms Services window, and a PRE-BLOCK trigger fires just before the user
successfully navigates to a new form block. POST- triggers fire just after an event successfully
completes. For example, a POST-QUERY trigger fires just after a query in a data block form
retrieves records. In contrast, the ON-,WHEN-, and KEY- triggers fire in response to actions. For
example, the ON-DELETE trigger fires in response to deleting a record in a data block form, and
the WHEN-BUTTON-PRESSED trigger fires in response to a user clicking a button.

PTS: 1 REF: 439

4. What is error severity? What levels are assigned to error severity? How does a developer
suppress messages with certain severity? What is the default suppressed severity?

ANS:
Oracle Corporation assigns the error severity levels, and the scale simply compares relative
severity, with 5 being low severity, 15 somewhat higher, 20 somewhat higher still, and >25 the
highest severity. Message severity levels do not correspond to error code numbers— Oracle
Corporation assigns the error code numbers sequentially as it documents new errors. Sometimes
form developers suppress the default system messages and replace them with custom messages.
Forms Builder determines which messages to display on the message line using the
:SYSTEM.MESSAGE_LEVEL variable. This is a system variable that stores a value
corresponding to one of the message severity levels (0, 5, 10, 15, 20, or 25).While a form is
running, Forms Services suppresses all messages with a severity level that is lower (less severe)
than the current :SYSTEM.MESSAGE_LEVEL value. The default
:SYSTEM.MESSAGE_LEVEL value is 0, so by default, all system messages appear. If you assign
the value 20 to :SYSTEM.MESSAGE_LEVEL, only messages with severity level 20 or higher
appear on the message line.

PTS: 1 REF: 451

5. How do you navigate from one form canvas to another?

ANS:
Test Bank for Guide to Oracle 10g, 5th Edition: Morrison

All form items have a Canvas property that specifies the name of the canvas on which the item
appears. When an item has the form focus, the form always displays the canvas on which that item
appears.To display a different canvas within a form that has multiple canvases, you execute the
GO_ITEM built-in, and move the form focus to an item on the target canvas. In the GO_ITEM
command, you do not expressly need to preface the item name with the block name, so you could
use the following command to move the form focus to the VIEW_UPDATE_BUTTON:
GO_ITEM('VIEW_UPDATE_BUTTON');. However, forms that contain multiple blocks often
contain text items in different blocks that have the same name. All block item values are visible to
all other blocks, including text items, command buttons, and so on. If you execute the GO_ITEM
command using only the item name, without the block name preface, and multiple items with that
name exist in the form, a runtime error occurs.Therefore, it is good practice to include the block
name when identifying a particular item.

PTS: 1 REF: 498-499

Visit TestBankBell.com to get complete for all chapters

You might also like