Example of Creating a Procedure

Consider the example of creating a procedure to determine table values in the desktop application.

To create a procedure, select the Create > Other > Procedure context menu item at the right part of the object navigator window.

Use the Basic Properties page to specify the object’s standard parameters:

Go to the next wizard page.

Use this page to specify the following parameters:

Name Identifier Data type Select the checkbox
Input PIN Integer Input
Input2 PIN2 Integer Input
Input3-Output PINOUT Integer Input, Output

Click the Add button to add parameters. The Object Parameter Properties dialog box for the Input parameter looks as follows:

Click the Next button to go to the next wizard page:

Use this page to specify the following parameters:

(PIN in number, PIN2 in varchar2, PINOUT in out varchar2)

    is

        begin

            insert into EXECPR (field, field1, field2) values (PIN,PIN2, PINOUT);

        end;

where:

After all the parameters are specified, click the Next button and then, on the Final Step page, click the Finish button:

To launch the created procedure, select the Open context menu item. The dialog box to set parameters opens after that:

Determine the required values and click the OK button. If the procedure or function is successfully executed, an appropriate message is displayed showing the user the results of procedure or function. This message box enables the user to open a text field that shows values of input and output parameters:

The Copy To Clipboard item copies contents of the text field to the clipboard.

See also:

Procedure