Defining result sets returned by a stored procedure

Use the Result page of the SQL Assist SmartGuide for Stored Procedures to definee a result set returned by the stored procedure selected on the Procedures page. You can define multiple result sets. You define each result set on a separately numbered Result page.

  sqlapc3.gif (7343 bytes)

Defining a result set

For the current numbered Result page, if you have already defined this result set, each of its columns is described in a row of the table on this page; if you have not yet defined this result set, the table on this page is empty.

For each column:

To define this result set for the first time, or to modify your previous definition of this result set, select Define this result set. This opens the SQL Assist SmartGuide to its Tables page. See "Defining a result set visually" for instructions on using the SQL Assist SmartGuide to define a result set. After you have finished defining the result set, your new definition will be shown in the table on this page.

If the stored procedure does not return any result sets, leave the table on the first numbered Result page empty, and do not define any additional result sets.

Defining additional result sets

From the first Result page (the tab for the page is labeled Result 1) select Add another result set. This displays a second Result page labeled Result 2. Define the second result set as described in "Defining a result set."

Define a third result set by selecting Add another result set in the Result 2 page. Repeat the process until you define all the result sets returned by the stored procedure.

You need not complete the definition of one result set before adding another one. You can return to the page for any result set and complete its definition at a later time.

If the stored procedure returns multiple result sets, but their definitions are identical, you only need to define one result set.

Removing a result set description

Select the Result page for the result set. Then select Remove this result set. The Result page will be removed from the notebook and any Result pages that follow it will be renumbered to reflect its removal.

When you finish defining a result set

When you finish defining one result set, select Next to display either the next result set (if you have added another one) or the SQL page of the SQL Assist SmartGuide for Stored Procedures. Use the SQL page to view the SQL CALL statement.

Select Back to display either the previous result set (if this is not Result 1) or the Parameters page of the SQL Assist SmartGuide for Stored Procedures.

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.


Defining a result set visually
Specifying the stored procedure for an SQL CALL statement
Working with stored procedure parameters
Displaying the SQL statement for a ProcedureCall bean