Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components
Close Print View
Designing: Select Procedures
 

Classic Java CAPS

Developing Java CAPS Projects

Using SOAP Message Handlers

Creating a Runtime Environment

Designing Business Processes in the Sun Business Process Manager

Working with TCP/IP HL7 Collaborations

Developing Sun Master Indexes (Repository)

Developing Sun Master Patient Indexes

Developing OTDs for Application Adapters

Developing OTDs for Communication Adapters

Developing OTDs for Database Adapters

Creating a New DB2 OTD

Select Wizard Type

Connecting to a Database

Selecting Database Objects

Selecting Table/Views/Aliases

Selecting Procedures

Add Prepared Statements

Specifying the OTD Name

To Specify the OTD Name

Reviewing Selections

Editing Existing OTDs

To Edit an Existing OTD

Creating a DB2 Connect OTD

Select Wizard Type

Connecting to Database

Selecting Database Objects

Selecting Table/Views/Aliases

Selecting Procedures

Adding Prepared Statements

Specifying the OTD Name

Review Selections

Editing Existing OTDs

To Edit an Existing OTD

Creating a New Informix OTD

Select Wizard Type

Connect To Database

Select Database Objects

Select Tables/Views/Aliases

Select Procedures

Add Prepared Statements

Specify the OTD Name

Review Selections

Steps to Edit an Existing Informix OTD

Steps to Edit the OTD from the Java CAPS IDE Include:

Creating a New JDBC OTD

Select Wizard Type

To Connect To Database

Select Database Objects

Select Tables/Views/Aliases

Select Procedures

Add Prepared Statement

Specify the OTD Name

Review Selections

Editing an Existing JDBC OTD

To Edit the OTD from the Java CAPS IDE

Creating an Oracle OTD

Select Wizard Type

Connect To Database

Select Database Objects

Select Tables/Views/Aliases

Select Procedures

Add Prepared Statement

Specify the OTD Name

Review Selections

Creating a New SQL Server OTD

Select Wizard Type

Connect to Database

Select Database Objects

Select Table/Views/Aliases

Select Procedures

Add Prepared Statements

Specify the OTD Name

Review Selections

Editing Existing OTDs

To Edit an Existing OTD

Creating a New Sybase OTD

Select Wizard Type

To Connect to Database

Select Database Objects

Select Tables/Views/Aliases

Select Procedures

Add Prepared Statement

Specify the OTD Name

Review Selections

Editing an Existing Sybase OTD

To Edit the OTD from the Java CAPS IDE

Creating a VSAM OTD

Select Wizard Type

Connect To Database

Select Database Objects

Select Tables/Views/Aliases

Add Prepared Statement

Specify the OTD Name

Review Selections

Using the OTD Importer in Netbeans

Developing OTDs for Web Server Adapters

Designing with Application Adapters

Designing with Communication Adapters

Designing with Web Server Adapters

SWIFT Integration Projects

Java EE Based Components

Designing with Sun JCA Adapters

About the TCP/IP JCA Adapter

Defining Constants and Variables

Using Database Operations

Developing Sun Master Indexes

Using the JMS JCA Wizard

Using the JAXB Wizard and Code-Seeder Pallete

Select Procedures

To Select Procedures
  1. On the Select Procedures and specify Resultset and Parameter Information window, click Add.
    Select Procedures and specify Resultset and Parameter Information
  2. On the Select Procedures window, enter the name of a Procedure or select a table from the drop down list. Click Search. Wildcard characters can also be used.
  3. In the resulting Procedure Selection list box, select a Procedure. Click OK.
    Add Procedures
  4. On the Select Procedures and specify Resultset and Parameter Information window click Edit Parameters to make any changes to the selected Procedure (see the following figure).
    Procedure Parameters
  5. To restore the data type, click Restore. When finished, click OK.
  6. To select how you would like the OTD to generate the nodes for the Resultset click Edit Resultsets.
  7. Click Add to add the type of Resultset node you would like to generate.
    Edit Resultset

    The DBWizard provides three different ways to generate the ResultSet nodes of a Stored Procedure. They are "By Executing", "Manually", and "With Assistance" modes.

    • By Executing Mode — “By Executing” mode executes the specified Stored Procedure with default values to generate the ResultSet(s). Depending on the business logic of the Stored Procedure, zero or more ResultSets can be returned from the execution. In the case that there are multiple ResultSets and "By Executing" mode does not return all ResultSets, one should use the other modes to generate the ResultSet nodes.

    • With Assistance Mode — "With Assistance" mode allows users to specify a query and execute it to generate the ResultSet node. To facilitate this operation, the DBWizard tries to retrieve the content of the specified Stored Procedure and display it. However, content retrieval is not supported by all types of Stored Procedures. We can roughly classify Stored Procedures into two types: SQL and external. SQL Stored Procedures are created using CREATE PROCEDURE SQL statements while external Stored Procedures are created using host languages (e.g. Java). Since external Stored Procedures do not store their execution plans in the database, content retrieval is impossible. When using "Assist" mode, highlight the execute statement up to and including the table name(s) before executing the query.

    • Manually Mode — "Manually" mode is the most flexible way to generate the result set nodes. It allows users to specify the node name, original column name and data type manually. One drawback of this method is that users need to know the original column names and data types. This is not always possible. For example, the column name of 3*C in this query.

      SELECT A, B, 3*C FROM table T

      is generated by the database. In this case, "With Assistance" mode is a better choice.

      If you modify the ResultSet generated with the by the “By Executing Mode” of the Database Wizard, you need to make sure the indexes match the Stored Procedure. This assures your ResultSet indexes are preserved.

  8. On the Select Procedures and specify Resultset and Parameter Information window click Next to continue.