setNCharacterStream(int parameterIndex, Reader value, long length)

Syntax:

void setNCharacterStream(int parameterIndex,
                         Reader value,
                         long length)
                         throws SQLException

Description:

Sets the designated parameter to a Reader object. The Reader reads the data till end-of-file is reached. The driver does the necessary conversion from Java character format to the national character set in the database.

Parameters:

parameterIndex

of the first parameter is 1, the second is 2, ...

value

the parameter value

length

the number of characters in the parameter data.

Throws:

SQLException - if a database access error occurs, parameterIndex is less than 1 or greater than the number of parameters, length is less than 0, or the prepared statement has been closed

Reference:

For more information, reference JDBC documentation for: PreparedStatement.setNCharacterStream(int, Reader, long)