Registers the designated output parameter. This version of
the method registerOutParameter
should be used for a user-named or REF output parameter. Examples
of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
named array types.
All OUT parameters must be registered before a stored procedure is executed.
For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters. Although it is intended for user-named and REF parameters, this method may be used to register a parameter of any JDBC type. If the parameter does not have a user-named or REF type, the typeName parameter is ignored.Note: When reading the value of an out parameter, you
must use the getXXX
method whose Java type XXX corresponds to the
parameter's registered SQL type.
The default implementation will throw SQLFeatureNotSupportedException
parameterName | the name of the parameter | |
sqlType | the JDBC type code defined by SQLType to use to
register the OUT Parameter. | |
typeName | the fully-qualified name of an SQL structured type |
SQLException | if parameterName does not correspond to a named
parameter; if a database access error occurs or
this method is called on a closed CallableStatement | |
SQLFeatureNotSupportedException | if the JDBC driver does not support the specified sqlType or if the JDBC driver does not support this method |
Diagram: Statement