Creating a Database Service

There are a number of ways to create a database service using the New Service wizard:

In all cases, you build the service using the database service editor.

Before you create your new service:

To create a database service:

  1. Open the New Service wizard. Choose from the following:

    • In the Service Development perspective, select File|New|Service from the main menu bar. Then Select Database Service and click Next.

    • In the Enterprise Explorer, right-click a database connection profile and select Create a Database Service from the context menu.

    • In the Enterprise Explorer or Database Explorer, expand the database connection profile to display its stored procedures and functions. Right-click a stored procedure and select Create a Database Service from the context menu.

  2. Define the name and location of the database service file. Do the following:

    • Select the project that uses this service.

    • Name the new service file with a unique and descriptive name.

    • Click Next.

  3. In the Service Summary page, complete the following and click Next:

    Service Summary page

    FieldDescription

    Name

    Edit the file name. The wizard automatically enters the same name as the service file in your project. It is recommended that you keep the names consistent for easy reference in the future.

    Note

    Sybase WorkSpace does not support the use of the # character in a service file name.

    Category

    Enter a new category, or select an existing category from the drop-down list. Note: If you plan to create multiple services, it is recommended that you group services into meaningful categories.

    Description

    Enter an internal description, such as an explanation of how and where this service is used. You can also add notes for other developers who may implement this service.

  4. (Optional) Select the stored procedures to be exposed in the database service and click Next.

    Note

    You also have the option to add SQL statements to the service operation at a later time. In this case, no action is required. Go to the next step.

    Browse Available Connection Profiles page

    FieldDescription

    Profile

    Enter the name of your database connection profile or select it from the drop-down list.

    • If no appropriate connection profile exists, click New to create one.

    • Click Connect to display a list of available stored procedures. Expand the list of available connection profiles, and select one or more stored procedures from the list.

  5. Review the Summary page and click Finish to create the Database Service.

    The database service file is added to your project in the WorkSpace Navigator and the service editor open.

Database Service

WorkSpace Navigator

Service Development Editors

Naming Conventions

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