nerdexam
Oracle

1Z0-141 · Question #70

1Z0-141 Question #70: Real Exam Question with Answer & Explanation

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

Question

You are developing a Human Resources form with a single block to display employees. For each employee, you look up the department name to display in a non-base-table item. When you test the form, you discover that when you enter a new employee as the first employee in a new department that has not yet been created in the database, you get the following error when you try to navigate out of the Department_Id item: FRM-40735: WHEN-VALIDATE-ITEM trigger raised unhandled exception ORA- 01403. The ORA-01403 exception is the NO_DATA_FOUND exception. When this message is received, you cannot navigate out of the Department_Id item. You add the following code to the When-Validate-Item trigger on the Department_Id item to display a meaningful message to the user: EXCEPTION WHEN NO_DATA_FOUND THEN MESSAGE('You must create the department before adding employees to it'); You run the form again to test it, and you enter a new employee and a department ID that does not exist in the database. When you click into the Employee_Name item, the appropriate message is displayed, but the cursor moves to Employee_Name. What must you change so that the user will not be able to navigate out of the Department_Id item when entering a department ID that is not in the database?

Options

  • AIf you write a handler for the exception, you will not be able to stop navigation from occurring,
  • BAdd the following code at the end of the exception handler:
  • CAdd the following line at the end of the exception handler:
  • DIf you write a handler for the exception, you will not be able to stop navigation from occurring.
  • EYou cannot stop navigation from occurring when displaying a custom message. You should

Unlock 1Z0-141 to see the answer

You've previewed enough free 1Z0-141 questions. Unlock 1Z0-141 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-141 Practice