Header Ads Widget

Responsive Advertisement

Module 15: Debugging Triggers

Debugging Triggers


01. Examine the PL/SQL block.

To resolve compiler or run-time errors, what three changes could you make to this code? (Choose three)    

A. Define the BEGIN and END keywords.

B. Declare PL/SQL variables in anonymous block 

C. Define an EXCEPTION section to handle exceptions.

D. Define an EXCEPTION section to declare exceptions.

E. Define an EXCEPTION section to declare PL/SQL variables.

F. Define a DECLARE section PL/SQL variables and exceptions.   

Answer: A, C, F

02. You are running the Employees form in debug mode and stepping through a procedure (as shown in the exhibit). You know that the stored function RAISE_SALARIES performs the correct calculation. Which Forms Builder menu item from the Debug menu should you select to position the marker on the line of code that begins as follows?                                                      

IF :employees.salary > 2000

A. Go

B. Step Into

C. Step Over

D. Step Out

E. Stop       

Answer: C

03.  What happens when you click Run Form Debug in Forms Builder?                                                   

A. The forms run on your local machine using a debug executable client.

B. The form runs in a three-tier environment using the application server URL that you specify in run-time preferences.

C. The form runs in a three-tier environment using the application server URL that you specify in debug preferences.

D. The form runs in a simulated three-tier environment using an applet viewer that is included with the product to enable debugging.

Answer: B

04. You are running a form in debug mode and you begin to step through the code of a lengthy subprogram. After stepping through a few lines of its code, you realize that the error comes not from the code in that particular subprogram but from code that is executed after it. At this point, how can you immediately jump to the next line of code after the call to the subprogram?                                               


A. Click Step Over to step over the execution of the subprogram.

B. Open the Stack panel, select the previous stack frame, and click Go.

C. Click Step Out to resume stepping through code after the subprogram is called.                                    

D. You cannot do this in the same debug session. Click Stop, set a breakpoint immediately after the subprogram code is called, and run the form in debug mode again.  

Answer: C

05. You are running a form in debug mode, but you have not set any breakpoints in the code. You click the button that invokes the code shown in the exhibit. While the code executes, you decide to examine the variable values in the loop. Which menu items in the Forms Builder Debug menu would you choose?

A. Stop, Debug Windows > Variables 

B. Pause, Debug Windows > Variables

C. Stop, Debug Windows > Forms Values 

D. Pause, Debug Windows > Form Values

E. Step Into, Debug Windows > Variables

F. Step Into, Debug Windows > Form Values

Answer: B

06. In Form Builder you attempt to compile a trigger. You receive a compilation error that gives no clear indication of the problem.

What are two likely causes? (Choose two)

A. Dividing by zero.

B. Missing semicolon.

C. Mismatched quotes.

D. Mistyped variable name.

E. Trigger defined on wrong item.

F. Trigger defined at wrong item.

Answer: B, C

07. You created a When-Validate-Item trigger for every item in the EMP_DATA data block. When you run the form in Debug mode, how could you display the ongoing messages about trigger execution?

A. In the Preference dialog, check the Debug Messages check box.

B. From the menu, select Program -> Debug Mode to set debug messages to On.

C. You cannot monitor triggers when they fire at runtime.

D. You cannot display the messages about trigger execution.

Answer: A

08. While running the EMPLOYEE form in debug mode, you would like to automatically bring up the PL/SQL debugger only if the salary in the current employee’s record exceeds $5000.

How can you accomplish this?

A. Set a breakpoint.

B. Enable debug messages.

C. Define a debug trigger.

D. This cannot be done automatically; you would need to select Help-->Debug from the menu when you notice a salary greater than $5000.

Answer: C

09. Under which two conditions will a trigger fail? (Choose two)

A. When an unhandled exception occurs.

B. When you raise the WHEN OTHERS exception.

C. When a trigger is defined at the wrong scope.

D. When you raise the FORM_TRIGGER_FAILURE exception.

E. When the PL/SQL editor displays a compilation error.

Answer: A, D

Post a Comment

0 Comments