You add stored procedure functions to your application in VisualAge using the Stored Procedure visual part in the Composition Editor. To add a stored procedure to an application's view, follow these steps:
VisualAge displays the Stored Procedure Settings window, as shown in the
following illustration.
For instructions on creating a connection specification, refer to Creating a connection specification.
VisualAge displays the Stored Procedure Specification Settings window as shown below.
Note: | If you are using DB2, refer to the DB2 Call Level Interface Guide and Reference for more information. |
DB2 CLI procedures will not show up unless the DB2CLI.PROCEDURES table on the DB2 server includes an entry for each procedure.
If you use ORACLE and you have defined stored procedures in packages, then those stored procedures will not show up in the combo box. You can type the procedure name into this field as <package>.procedure. Replace package with the package name and procedure with the procedure name.
To define variables manually, place the mouse pointer in this field and press button 2. Select either Add before or Add After to add variables in the correct order, or Edit to edit existing variables. On the Stored Procedure Host Variable window, define the variable, including the bind type (Input, Input/Output, Output, Return Value), then select OK. After you have added variables, you can also delete them from the pop-up menu.
To automatically query the database for parameter shapes and display them in this list , place the mouse pointer in this field and press button 2, then select Get schema. This adds all of the variables in your stored procedure.
Note: | Not all ODBC data sources support Get schema. |