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 Informix® 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:
  • Informix® 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 Informix® database.
  • J/Foundation Developer's Guide describes how to write Java UDRs for use in the database server.
  • The Informix® Guide to SQL: Tutorial describes how to write stored procedure language (SPL) routines.
  • The Informix® DataBlade® API Programmer's Guide describes how to write external C routines.

Informix® database servers return one or multiple OUT parameter to Informix® 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 Informix® JDBC Driver is installed.