Oracle
1Z0-141 · Question #65
1Z0-141 Question #65: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-141 to reveal the answer and full explanation for question #65. The question stem and answer options stay visible for context.
Question
You are developing a form that uses alerts to display database messages rather than associated FRM messages when the SQL statements issued by the form cause database errors to occur. You use a generic alert called DB_Alert to display the messages. You begin to code an On-Error trigger to trap the FRM-40505 error that occurs when the SQL statement references an invalid column name. The associated database message is "ORA- 00904: Invalid column name", and this is what you want to be displayed in the alert. You create a form-level On-Error trigger with the following code: DECLARE n NUMBER; BEGIN IF ERROR_CODE = 40505 THEN SET_ALERT_PROPERTY('DB_Alert',ALERT_MESSAGE_TEXT, DBMS_ERROR_CODE); n := SHOW_ALERT('DB_Alert'); END IF; END; You run the form to test it. What will the run-time behavior be when the FRM-40505 error is encountered?
Options
- AThe alert called DB_Alert appears with the message "ORA-00904: Invalid column name".
- BThe alert called DB_Alert appears, but not with the correct message.
- CThe alert does not appear, and the FRM-40505 message appears on the message line.
- DThe alert does not appear, and the message "ORA-00904: Invalid column name" appears on
- EThe alert does not appear, and the message "FRM-41039: Invalid Alert ID 0" appears on the
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.