Adding a Stored Procedure Operation

You can add stored procedures operations to a database service interface using the following methods:

To add a stored procedure:

  1. Open the database service you want to add a stored procedure to.

  2. Add a stored procedure operation to the service interface. Select the Service Interface tab in the database service editor and choose from the following:

    • Select the Service Interface page in the editor and do the following:

      1. Right-click the Interface box and select Add Stored Procedure Operation|Browse for Stored Procedure Operation from the context menu.

      2. Select one or more stored procedures from the list and click OK.

        Note

        You cannot have two stored procedures from different databases with the same name. If this problem occurs, modify the spname element of the catalog.schema.spname operation qualification to be spname1. See Renaming a Procedural Object for more information.

        A new operation with the same name as each selected stored procedure is added to the interface.

        • If not already added, an endpoint corresponding to the JDBC connection profile exposing the stored procedures is also added to the service interface.

        • If a stored procedure was exposed from an existing operation, it does not appear in this list.

    • Open the Enterprise Explorer. and do the following:

      1. Expand the database connection profile and drill down until you display the available Procedures & Functions.

      2. Drag the stored procedure you want to add to the service interface from the Enterprise Explorer to the service editor.

    • Open the Tool palette. Drag the Stored Procedure - Request Response icon from the palette onto the service interface.

      A stored procedure operation is added to the database service interface.

  3. Review operation parameters and results sets. Select an operation and expand the Operation Parameters panel.

    Operation Parameters

    TabDescription

    Parameters

    Describes the parameters that are sent to this operation and any return values

    Result Sets

    Displays a list of the different result sets the operation returns.

  4. Review operation properties. Select an operation and expand the Properties Panel.

    Properties Panel

    TabDescription

    Source

    Describes the source of the stored procedure.

    To add or edit stored procedures, click Browse, select a stored procedure, and click OK.

    Basic

    Lists the operation properties. You can manually edit the properties from this location.

  5. Save the service file. Click File|Save.

Discovering Result Sets Using the Wizard

Discovering Result Sets Using the Dialog

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com