--- title: "updateNCharacterStream Method (int, java.io.Reader, long) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual ms.assetid: aeec0a56-038e-45b1-98c8-b1046ebd25db author: David-Engel ms.author: v-daenge --- # updateNCharacterStream Method (int, java.io.Reader, long) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Updates the designated column with a character stream value, which will have the specified number of bytes. ## Syntax ``` public void updateNCharacterStream(int columnIndex, java.io.Reader x, long length) ``` #### Parameters *columnIndex* An **int** that indicates the column index. *x* A Reader object. *length* The length of the stream. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This updateNCharacterStream method is specified by the updateNCharacterStream method in the java.sql.ResultSet interface. This method passes Unicode characters from a Reader object to selected **nchar**, **nvarchar(max)**, **ntext**, and **xml** columns. Using this method on other data type columns will throw an exception. If the length of the stream is different than what is specified in the *length* parameter, the JDBC driver throws an exception when the row is updated or inserted. If the length of the stream is unknown, the *length* parameter may be set to -1 to indicate that the driver should accept the stream regardless of its length. With sqljdbc4.jar, we recommend that you use the JDBC 4.0 method [updateNCharacterStream Method (int, java.io.Reader)](../../../connect/jdbc/reference/updatencharacterstream-method-int-java-io-reader.md) when the application wants to update the column from a stream whose length is unknown. ## See Also [updateNCharacterStream Method (SQLServerResultSet)](../../../connect/jdbc/reference/updatencharacterstream-method-sqlserverresultset.md) [SQLServerResultSet Members](../../../connect/jdbc/reference/sqlserverresultset-members.md) [SQLServerResultSet Class](../../../connect/jdbc/reference/sqlserverresultset-class.md)