Adding a SQL Statement Operation by Importing Query Files

Add a SQL statement operation to your database service by using an imported query file. You can also edit the database service interface using this method.

Prerequisites:

To add a SQL statement using a query file:

  1. Open the database service you want to add a SQL statement to.

  2. Select the Service Interface tab in the database service editor.

  3. Add a SQL statement to the service interface. Choose from the following:

    • Select the Service Interface page in the editor. Right-click the Interface box and select Add SQL Statement Operation|Add Request-Response Operation from the context menu.

    • Open the Tool palette. Drag the SQL Statement - Request Response icon from the palette onto the interface.

    • Drag and drop a query file from the WorkSpace Navigator onto the interface.

    A default operation is added to the service interface.

  4. Select to add a default operation to the interface.

  5. Open the Properties Panel.

    The Source tab describes the query file. The Basic Properties tab lists properties, which you can manually edit.

  6. Add a SQL statement. Do the following:

    1. In the service editor, select the operation.

    2. In the Properties Panel, select the Source tab.

    3. Click Import Query File to open the Import Query File dialog. Select a Query file from your project and click OK to import the query file into the database service interface.

      The Source tab of the Database Operation Parameters dialog displays the path to the query file and the SQL text. The Parameters tab displays the query's parameters, and the Result Sets tab displays the results.

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

Adding a SQL Statement Operation Using Visual SQL

Adding a SQL Statement Operation Using the Properties Panel

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