nerdexam
Oracle

1Z0-151 · Question #50

View the Exhibit. To test how the Orders application works with database triggers, you add to the Orders table the following database trigger that fires before the update of Customer_Id: BEGIN If…

The correct answer is A. IF ERROR_CODE = 40509 THEN. See the full explanation below for the reasoning.

Question

View the Exhibit. To test how the Orders application works with database triggers, you add to the Orders table the following database trigger that fires before the update of Customer_Id:

BEGIN If :old.customer_id != : new.customer_id then RAISE_APPLICATION_ERROR (-20101, 'Database trigger says no!'); end if; END; You run the Orders form, change the customer ID, and click Save. You receive the error message "FRM-40509: Oracle error: unable to UPDATE record." You select Help > Display Error, and the Database Error dialog box that is shown in the Exhibit appears. Which code would you put in your Form-level On-Error trigger to display the ORA- error message instead of the FRM- error message?

Exhibit

1Z0-151 question #50 exhibit

Options

  • AIF ERROR_CODE = 40509 THEN
  • BIF ERROR_CODE = 40509 THEN
  • CIF ERROR_CODE = 06512 THEN
  • DIF ERROR_CODE = 06512 THEN
  • EIF ERROR-CODE = 20101 THEN
  • FIF ERROR_CODE = 20101 THEN

How the community answered

(18 responses)
  • A
    78% (14)
  • B
    6% (1)
  • C
    6% (1)
  • D
    11% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-151 Practice