DB2 10.5 for Linux, UNIX, and Windows

DB2ParameterMetaData interface

The com.ibm.db2.jcc.DB2ParameterMetaData interface extends the java.sql.ParameterMetaData interface.

DB2ParameterMetaData methods

The following methods are defined only for the IBM® Data Server Driver for JDBC and SQLJ.

getMaxStringUnitBits
Format:
public int getMaxStringUnitBits (int param)
  throws java.sql.SQLException
Returns the maximum number of bits in a string unit for single-byte and double-byte character data types. The value that is returned is:
8
For a character column that is defined with OCTETS.
16
For a character column that is defined with CODEUNITS16.
32
For a character column that is defined with CODEUNITS32.
Parameter descriptions:
param
The ordinal position of a parameter in the CALL statement.

This method applies only to connections to DB2® for Linux, UNIX, and Windows Version 10.5 or later data servers.

getParameterMarkerNames
Format:
public String[] getParameterMarkerNames()
  throws java.sql.SQLException

Returns a list of the parameter marker names that are used in an SQL statement.

This method returns null if the enableNamedParameterMarkers property is set DB2BaseDataSource.NOT_SET or DB2BaseDataSource.NO, or if there are no named parameter markers in the SQL statement.

getProcedureParameterName
Format:
public String getProcedureParameterName(int param)
  throws java.sql.SQLException

Returns the name in the CREATE PROCEDURE statement of a parameter in an SQL CALL statement. If the parameter has no name in the CREATE PROCEDURE statement, the ordinal position of the parameter in the CREATE PROCEDURE statement is returned.

Parameter descriptions:
param
The ordinal position of the parameter in the CALL statement.

This method applies to connections to DB2 for Linux, UNIX, and Windows 9.7 or later data servers only.