HPlogo HP Driver for JDBC User's Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 ALLBASE/SQL Specifics

Stored Procedures

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The HP Driver for JDBC supports the following types of ALLBASE/SQL stored procedures through the java.sql.CallableStatement interface:

  1. Procedures that return one or more result sets.

  2. Procedures that take one or more input arguments.

  3. Procedures that return one or more output arguments.

  4. Procedures that have a return status value.

Procedures may be of one or more of these combinations; for example, the procedure may have parameterized input and a return status, and return one or more result sets.

Stored procedures are executed by first creating a java.sql.CallableStatement object with the execute procedure SQL statement. The execute procedure SQL statement in one or more of the following formats (each format corresponds to one of the cases listed above):

  1. EXECUTE PROCEDURE PROCNAME

  2. EXECUTE PROCEDURE PROCNAME(10, ?)

  3. EXECUTE PROCEDURE PROCNAME(? OUTPUT, ? OUTPUT ONLY)

  4. EXECUTE PROCEDURE ? = PROCNAME

Input arguments can be either explicitly specified in the SQL statement, or dynamic parameters can be used for passing values when the statement is executed.

Output only arguments must be specified with a dynamic parameter, otherwise the output value will not be returned.

Feedback to webmaster