1Z0-141 · Question #65
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…
The correct answer is B. The alert called DB_Alert appears, but not with the correct message. See the full explanation below for the reasoning.
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
How the community answered
(28 responses)- A4% (1)
- B71% (20)
- C4% (1)
- D7% (2)
- E14% (4)
Community Discussion
No community discussion yet for this question.