Oracle 1z0-151 Exam Practice Questions (P. 2)
- Full Access (90 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
The Order Entry application contains several forms. The inventories form uses an LOV that is based on a record group that queries the Warehouses table to return a warehouse ID.
Several of the forms use LOVs that are based on the same query. You decide to centralize the creation of the record group to the entry form of the application, which opens all the other forms, for example, to open the inventories form, there is a When-Button Pressed trigger on the inventories button with the following code;
OPEN _FORM ('inventories');
in a When-New-Form-instance trigger for the entry form, you create the warehouse_rg record group by using the CREATE_GROUP_QUERY built in with the following arguments:
('warehouse_rg' , 'SELECT ALL WAREHOUSE.WAREHOUSE_ID, WAREHOUSE.WAREHOUSE_NAME FORM WAREHOUSE order by warehouse_name);
You also populate the record group in this trigger.
What must you do to make this record group available to the inventories form and the other forms?
Several of the forms use LOVs that are based on the same query. You decide to centralize the creation of the record group to the entry form of the application, which opens all the other forms, for example, to open the inventories form, there is a When-Button Pressed trigger on the inventories button with the following code;
OPEN _FORM ('inventories');
in a When-New-Form-instance trigger for the entry form, you create the warehouse_rg record group by using the CREATE_GROUP_QUERY built in with the following arguments:
('warehouse_rg' , 'SELECT ALL WAREHOUSE.WAREHOUSE_ID, WAREHOUSE.WAREHOUSE_NAME FORM WAREHOUSE order by warehouse_name);
You also populate the record group in this trigger.
What must you do to make this record group available to the inventories form and the other forms?
- Ain the When-New-Form-instance trigger for the entry form, add a values for the SCOPE argument of CREATE_GROUP_QUERY.
- Bin the entry form, move the record group code to the end of the When-Button-Pressed triggers for the buttons that open other forms, so that the record group is created and populated immediately after OPEN_FORM is called.
- Cin the entry form, move the record group code to the beginning of the When-Button-Pressed triggers for the button that open other forms, so that the record group is created and populated just before OPEN_FORM is called.
- Din the When-Button_Pressed triggers of the entry from the buttons that open other forms, add a value for the SESSION argument of OPEN_FORM.
- Ein the other forms, refer to the record group as: global.warehouse_rg.
Correct Answer:
A
Note: The CREATE_GROUP_FROM_QUERY built-in is a function and must be invoked as part of an expression. For example:
DECLARE -
rg_id RecordGroup;
BEGIN -
rg_id := CREATE_GROUP_FROM_QUERY ('employee_rg', 'SELECT id,first_name,last_name,sal FROM employee');
END;
A
Note: The CREATE_GROUP_FROM_QUERY built-in is a function and must be invoked as part of an expression. For example:
DECLARE -
rg_id RecordGroup;
BEGIN -
rg_id := CREATE_GROUP_FROM_QUERY ('employee_rg', 'SELECT id,first_name,last_name,sal FROM employee');
END;
send
light_mode
delete
Question #7
View the Exhibit.

Iin the Human Resources form shown in the Exhibit, you want to modify the prompts, heights, and widths of the Department Id, Manager Id, and Location Id Holds in the Departments data block.
What must you select before invoking the Layout Wizard in reentrant mode to modify these item properties?

Iin the Human Resources form shown in the Exhibit, you want to modify the prompts, heights, and widths of the Department Id, Manager Id, and Location Id Holds in the Departments data block.
What must you select before invoking the Layout Wizard in reentrant mode to modify these item properties?
- AFrame5
- BFrames
- CCanvas4
- Dthe Departments block
- Ethe DEPARTMENT_ID, MANAGER_ID and LOCATION_ID items
Correct Answer:
A
A
send
light_mode
delete
Question #8
You are implementing a JavaBean in a form, the bean has no visible component on the form when invoked, the bean displays an input text where users enter a zip code, the bean has a single method that returns a short weather forecast for that zip code as a character value.
How can you retrieve that value so that you can display it to the user?
How can you retrieve that value so that you can display it to the user?
- AUse FBEAN.ENABLE_EVENT to register a listener for the bean event. Obtain the value of SYSTEM.CUSTOM_ITEM_EVENT in a When-Custom item Event trigger, and then use that value as an argument to the MESSAGE built in.
- BUse FBEAN.REGISTER_BEAN as an argument to the MESSAGE built in to invoke the bean's method and return the value as a message displayed to the user.
- CUse FBEAN.REGISTER_BEAN to register the bean, so that when the user enters a zip code into the bean s input text, the value is automatically displayed in the bean area item.
- DUse FBEAN.ENABLE_EVENT to register a listener for the bean event. Obtain the value of SYSTEM.CUSTOM_EVENT_PARAMETER in a When_Custom-
Correct Answer:
D
When a user interacts with a JavaBean at run time, it usually causes an event to occur.
You can use FBEAN.ENABLE_EVENT to register a listener for the event, so that when the event occurs Forms will fire the When-Custom-Item-Event trigger. In this trigger, you can code a response to the event. The :SYSTEM.CUSTOM_ITEM_EVENT and :SYSTEM.CUSTOM_EVENT_PARAMETERS variables contain the name of the event and information the bean is sending to the form.
D
When a user interacts with a JavaBean at run time, it usually causes an event to occur.
You can use FBEAN.ENABLE_EVENT to register a listener for the event, so that when the event occurs Forms will fire the When-Custom-Item-Event trigger. In this trigger, you can code a response to the event. The :SYSTEM.CUSTOM_ITEM_EVENT and :SYSTEM.CUSTOM_EVENT_PARAMETERS variables contain the name of the event and information the bean is sending to the form.
send
light_mode
delete
Question #9
The Orders database table uses Order_id as its primary key. You have written the following code to use in the Orders block of a form:
SELECT orders_seq.NEXTVAL -
INTO :orders.order_id -
FROM SYS.dual;
Which statement is true about this code?
SELECT orders_seq.NEXTVAL -
INTO :orders.order_id -
FROM SYS.dual;
Which statement is true about this code?
- AIf you place this Code in a trigger that fires when the record is inserted into the database, you will likely have more gaps in Order IDs than if you use the sequence as a default value for the item.
- BIf you place this code in a trigger, you should ensure that Order_Id has its required property set to Yes.
- CIf you place this code in a trigger, you should ensure that Order_Id has its Database Item property set to No.
- DIf the named sequence does not exist, it is automatically created the first time the code is called.
- EYou should place this code a in a database trigger to minimize the gaps in Order IDs.
- FYou should place this code in Pre-insert trigger to minimize the gaps in Order IDs.
- GYou should place this code in a Post_insert trigger to minimize the gaps in Order IDs.
Correct Answer:
F
Assigning Sequence Numbers to Records
You will recall that you can assign default values for items from an Oracle sequence, to automatically provide unique keys for records on their creation. However, if the user does not complete a record, the assigned sequence number is "wasted."
An alternative method is to assign unique keys to records from a Pre-Insert trigger, just before their insertion in the base table, by which time the user has completed the record and issued the Save.
Assigning unique keys in the posting phase can:
* Reduce gaps in the assigned numbers
* Reduce data traffic on record creation, especially if records are discarded before saving
Example -
This Pre-Insert trigger on the ORDERS block assigns an Order ID from the sequence ORDERS_SEQ, which will be written to the ORDER_ID column when the row is subsequently inserted.
SELECT ORDERS_SEQ.nextval -
INTO :ORDERS.order_id -
FROM SYS.dual;
F
Assigning Sequence Numbers to Records
You will recall that you can assign default values for items from an Oracle sequence, to automatically provide unique keys for records on their creation. However, if the user does not complete a record, the assigned sequence number is "wasted."
An alternative method is to assign unique keys to records from a Pre-Insert trigger, just before their insertion in the base table, by which time the user has completed the record and issued the Save.
Assigning unique keys in the posting phase can:
* Reduce gaps in the assigned numbers
* Reduce data traffic on record creation, especially if records are discarded before saving
Example -
This Pre-Insert trigger on the ORDERS block assigns an Order ID from the sequence ORDERS_SEQ, which will be written to the ORDER_ID column when the row is subsequently inserted.
SELECT ORDERS_SEQ.nextval -
INTO :ORDERS.order_id -
FROM SYS.dual;
send
light_mode
delete
Question #10
In Forms Builder, the iconic buttons on the form are blank, but when you click Run Form the form appears in the browser with Images in the iconic buttons.
What are two things that you can check to track the source of this problem?
What are two things that you can check to track the source of this problem?
- Aforms Builder runtime preferences
- Bthe UI_ICON setting in the operating system
- Cthe iconpath setting in the Forms registry file
- Dthe UI_ICOM_EXTENSION setting in the operating system
- Ethe iconextension setting in the Forms registry file
- Fthe FORMS_PATH setting in the Forms environment file
- Gthe classpath setting in the operating system
Correct Answer:
BD
BD
send
light_mode
delete
All Pages