8.4.18 setCharacterStream(int parameterIndex, Reader reader, int length)
- Organization of this subsection
(1) Function
This method sets a specified Reader object as a dynamic parameter value.
(2) Format
public synchronized void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
(3) Arguments
- int parameterIndex
-
Specifies the number of a dynamic parameter.
- Reader reader
-
Specifies the java.io.Reader object that contains the value to be set in the specified dynamic parameter.
- int length
-
Specifies the number of characters.
(4) Return value
None.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
The PreparedStatement object is closed.
-
The Connection object that created this PreparedStatement object is closed.
-
A value less than 0 was specified for length.
-
A nonexistent dynamic parameter number was specified.
-
This method does not support the HADB data type specified in the dynamic parameter.
-
The specified value is outside the range of data types for the column or in a format that cannot be converted.
-
Encoding failed.