setCharacterStream(String parameterName, Reader reader, int length)


void setCharacterStream(String parameterName,
                        Reader reader,
                        int length)
                        throws SQLException


Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.



the name of the parameter


the object that contains the Unicode data


the number of characters in the stream


SQLException - if a database access error occurs, parameterName is not a valid parameter name, length is less than 0, or the prepared statement has been closed


For more information, reference JDBC documentation for: CallableStatement.setCharacterStream(String, Reader, int)