nerdexam
Oracle

1Z0-151 · Question #90

View the Exhibit. You have placed the following code in a Post insert trigger on the Orders block: SELECT orders_seq.NEXTVAL INTO :orders.order_id FORM SYS.dual; You have also set Item properties…

The correct answer is A. The code should be in Pre_insert trigger instead. See the full explanation below for the reasoning.

Question

View the Exhibit. You have placed the following code in a Post insert trigger on the Orders block:

SELECT orders_seq.NEXTVAL INTO :orders.order_id FORM SYS.dual; You have also set Item properties for the Order_Id Item in the form so that users cannot directly enter an Order ID. As the SUMMIT user, you run the form to test it. You are able to insert a record in the block, but when you click Save, you have a database error as shown in the Exhibit. What is the probable cause of this error?

Exhibit

1Z0-151 question #90 exhibit

Options

  • AThe code should be in Pre_insert trigger instead
  • BThe code should be in a database trigger instead
  • CYou should change the code to select the sequence number from SUMMIT.dual instead.
  • DYou should create the sequence in the database, because the runtime error is an indication that is
  • EYou should assign a temporary value to the Order_Id item before saving the form.

How the community answered

(26 responses)
  • A
    77% (20)
  • B
    8% (2)
  • C
    12% (3)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-151 Practice