The CallableStatement OUT parameters

The CallableStatement methods handle OUT parameters in C function and Java™ user-defined routines (UDRs). Two registerOutParameter() methods specify the data type of OUT parameters to the driver. A series of getXXX() methods retrieves OUT parameters.

The OUT parameter routine makes available a valid blob descriptor and data to the JDBC client for a BINARY OUT parameter. Using receive methods, you can use these OUT parameter descriptors and data provided by the server.

Exchange of descriptor and data between HCL OneDB™ and JDBC is consistent with the existing mechanism by which data is exchanged for the result set methods of JDBC, such as passing the blob descriptor and data through SQLI protocol methods. (SPL UDRs are the only type of UDRs supporting BINARY OUT parameters.)

For background information, see the following documentation:
  • HCL OneDB User-Defined Routines and Data Types Developer's Guide provides introductory and background information about opaque types and user-defined routines (UDRs) for use in the HCL OneDB database.
  • HCL® J/Foundation Developer's Guide describes how to write Java UDRs for use in the database server.
  • The HCL OneDB Guide to SQL: Tutorial describes how to write stored procedure language (SPL) routines.
  • The HCL OneDB DataBlade® API Programmer's Guide describes how to write external C routines.

HCL OneDB database servers return one or multiple OUT parameter to HCL OneDB JDBC Driver.

For examples of how to use OUT parameters, see the CallOut1.java, CallOut2.java, CallOut3.java, and CallOut4.java example programs in the basic subdirectory of the demo directory where your HCL OneDB JDBC Driver is installed.