Tutorial for Designer/2000
Lesson 9, page 2
- 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: The Window with the list of triggers available to the user
- 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: Selecting the When-Button-Pressed trigger
- 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.
Figure 9.14: The PL/SQL Editor window
- After typing in the code, click compile on the upper left-hand corner of the window. (See Figure 9.15)
Figure 9.15: The Window for the PL/SQL Editor with the code for the LOV
- 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: Selecting Run Form from the Program menu
- 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: The List of values for the Majors
On to page three
Page 1, Page 2, Page 3, Page 4 / Back to the tutorial index.
About the Book
©1999 Prentice-Hall, Inc., A division of Pearson Education, Upper Saddle River, New Jersey 07458 Legal Statement
Comments should be directed to firstname.lastname@example.org