When you create stored procedure operations, you can discover and view their parameters and result sets. If the JDBC driver does not provide sufficient metadata, you can use the discovery mechanism. The discovery mechanism allows you to provide input parameter data used to execute the procedure, get metadata, roll back the transaction, and add the discovered result sets back to the database service operation.
To discover result sets:
On the Service Interface page, expand the Operation Parameters section.
Click the Results Sets tab.
Click Discover.
The Discover Result Set wizard appears. This wizard walks you through the steps necessary to execute a stored procedure or SQL statement and retrieve result set metadata that can be used by the operation at runtime. After result sets have been discovered, you can modify them before adding them to the operation. If you do not want to view the Introduction page again, select the Don't Show Introduction Page Anymore checkbox.
If you get 'No result sets were discovered for this operation', verify that the stored procedure returns a result set or check with your DBA for specific result set requirements.
If you prefer using the Discover Result Set dialog rather than the wizard, select the appropriate check box.
Click Next.
The wizard prompts you to add an endpoint, if not already present.
Click Next to specify input parameter variables for any parameters.
The use of cursors as parameters in an Oracle stored procedure is not supported. If you attempt to discover a result set for an Oracle stored procedure that uses cursors as parameters, you will encounter an error.
Click Next to view discovered result sets.
Verify that all fields are correct with respect to the database, including the data type nullable fields.
Use any client tool that returns database metadata to verify fields.
Care must be taken if the client tool uses JDBC, because it might return the same incorrect data type. Use a client tool provided by the database manufacturer, for example, Sybase Central, for checking against an ASA database.
If you find that a field does not match that of the database, open the Edit Result Set dialog to modify it.
Use the Review result sets dialog to edit, move, or add line items.
A Result Set has a name and an associated row. Each row has a set of columns. Each column has a set of properties very similar to those available for creating a parameter for a stored procedure or SQL statement operation. The properties for a column include:
Column Name
Mapped name
Type
Scale
Precision
Nullable
Click Finish to add the result sets to the operation.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com