The HP Driver for JDBC supports the following types of ALLBASE/SQL
stored procedures through the java.sql.CallableStatement interface:
Procedures that return one or more
result sets.
Procedures that take one or more input arguments.
Procedures that return one or more output arguments.
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):
EXECUTE PROCEDURE PROCNAME
EXECUTE PROCEDURE PROCNAME(10, ?)
EXECUTE PROCEDURE PROCNAME(? OUTPUT, ? OUTPUT ONLY)
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.