In this example, create a procedure to determine the table values.
To create a procedure, select the Create > Procedure context menu item at the right part of the object navigator dialog box.
Use the Basic Properties page to specify the object’s standard parameters:
Name: "Determine Parameters" Procedure.
Identifier: PROCEDURE_TABLE.
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:
Database: Data.
Driver: Oracle 9.x\10.x\11.x.
Object type: Procedure.
Script: Use the following script:
(PIN in number, PIN2 in varchar2, PINOUT in out varchar2)
is
begin
insert into EXECPR (field, field1, field2) values (PIN,PIN2, PINOUT);
end;
where:
PIN, PIN2, PINOUT. Procedure parameters identifiers.
EXECPR. Table identifier to which the values must be added.
field, field1, field2. Table fields which are to contain values of the PIN, PIN2, PINOUT parameters respectively.
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: