Tutorial for Designer/2000
and Developer/2000


Lesson 9, page 2

  1. In the PL/SQL Editor we will write a trigger that will connect this button to the table called Major_List, so that when the user clicks on the button they will be able to view the list of options. When you select the Pl/SQL Editor, the window for the new trigger selection will appear. (See Figure 9.12)

    Figure 9.12

    Figure 9.12: The Window with the list of triggers available to the user

  2. We will write a When-Button-Pressed trigger, since we would like the code to be activated when the user presses the button. Scroll down and select When-Button-pressed trigger. (See Figure 9.13)

    Figure 9.13

    Figure 9.13: Selecting the When-Button-Pressed trigger

  3. Immediately, you will see the PL/SQL Editor window. (See Figure 9.14). Type in the following code in the blank space in the Editor.

    Declare
    Return_LOV Boolean;
    Begin
    Return_LOV :=show_LOV('Major_LOV');
    End;

    Figure 9.14

    Figure 9.14: The PL/SQL Editor window

  4. After typing in the code, click compile on the upper left-hand corner of the window. (See Figure 9.15)

    Figure 9.15

    Figure 9.15: The Window for the PL/SQL Editor with the code for the LOV

  5. To test how the button works, you can view the form by returning to the Canvas View and selecting Run Form from the Program menu. (See Figure 9.16)

    Figure 9.16

    Figure 9.16: Selecting Run Form from the Program menu

  6. When the form is running, type in an ID number in the STUDID field (there has to be data in the primary field). Then click the button with the down arrow. The list of majors will pop up. (See Figure 9.17). To return to the canvas View, simply click OK in the list of majors and click the close button in the upper right taskbar.

    Figure 9.17

    Figure 9.17: The List of values for the Majors

On to page three

Page 1, Page 2, Page 3, Page 4 / Back to the tutorial index.


Main Page About the Book Student Resources Oracle Resources Instructor Resources Contact Us

1999 Prentice-Hall, Inc., A division of Pearson Education, Upper Saddle River, New Jersey 07458 Legal Statement
Comments should be directed to webmaster@prenhall.com