nerdexam
Oracle

1Z0-151 · Question #63

1Z0-151 Question #63: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-151 to reveal the answer and full explanation for question #63. The question stem and answer options stay visible for context.

Question

The Orders form, whose properties have not been changed from the default, has two non-base table text items to display the sales representative's first and last names. You want to ensure that entries made in these Items correspond to an existing employee, so you write a When-Validate-Item trigger for the Sales_Rep_First_Name text item: SELECT LAST_NAME Into :last_name FROM employees WHERE first_name = :first_name; EXCEPTION WHEN NO_DATA_FOUND THEN MESSAGE ('There is no sales rep by this name'); When you test the form and enter a first name that does not exist in the database, the message that you specified appears, but the cursor goes to the Sales_Rep_Last_Name item. You want the cursor to remain in the Sales_Rep__First Name item until a correct first name is entered. Also, as you continue to test the form, at times, the cursor does not leave the Sales_Rep_First_Name item after you enter a name, but no error message appears. Which two things can you do to correct these problems?

Options

  • AAdd the code to handle the FORM_TRIGGER_FAILURE exception.
  • BRaise the FORM_TRIGGER_FAILURE exception.
  • CAdd code to handle the TOO_MANY_ROWS exception.
  • DRaise the TOO_MANY_ROWS exception.
  • ECode an On-Error trigger.
  • FCode an On-Message trigger.
  • GWrite a When-Validate-Item trigger for the Sales_Rep_Last_Name item.
  • HMove the code to a form-level When-Validate-Item trigger.

Unlock 1Z0-151 to see the answer

You've previewed enough free 1Z0-151 questions. Unlock 1Z0-151 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-151 Practice