Working with stored procedure parameters

Use the Parameters page of the SQLAssist SmartGuide for Stored Procedures to examine the parameters registered for the stored procedure and to optionally hard-code an input value for parameters whose mode is in or inout.

sqlapc2.gif (6479 bytes)

Each parameter registered for the stored procedure selected on the Procedures page is described in a row of the table on this page.

VisualAge for Java generates a parameter in the CALL statement for each parameter that does not have a hard-coded input value. The name of the parameter is the same as the name that appears in the Name field.

To hard-code an input value for a parameter, enter the desired value in the Input value field for that parameter. For a parameter whose mode is output, that field is not editable. For a parameter whose mode is inout, the field is editable, but you should generally not hard-code an input value. If you do, no parameter is generated in your CALL statement, and you cannot obtain the output value after the stored procedure executes.

When you finish working with parameters, select Next. This displays the first Result page of the SQL Assist SmartGuide for Stored Procedures. Use this page to describe the first result set if the stored procedure returns at least one result set.

Select Back to display the Procedures page of the SQL Assist SmartGuide for Stored Procedures. If appropriate, you can then change the stored procedure that is executed.

You can also display any page in the SQL Assist SmartGuide for Stored Procedures by selecting its tab.

When you complete the specification of your SQL CALL statement, select Finish. This generates the code for the SQL statement and closes the SQL Assist SmartGuide for Stored Procedures.

To cancel visual composition of the SQL CALL statement, select Cancel.


Specifying the stored procedure for an SQL CALL statement
Defining result sets returned by a stored procedure
Displaying the SQL statement for a ProcedureCall bean