--- title: "updateAsciiStream Method (java.io.InputStream, int) | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual apiname: - "SQLServerResultSet.updateAsciiStream (int, java.io.InputStream.int)" apilocation: - "sqljdbc.jar" apitype: "Assembly" ms.assetid: d07944b8-7001-49b5-b3b3-0676f71e17cf author: David-Engel ms.author: v-daenge --- # updateAsciiStream Method (int, java.io.InputStream, int) [!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)] Updates the designated column with an ASCII stream value, which will have the specified number of bytes. ## Syntax ``` public void updateAsciiStream(int index, java.io.InputStream x, int length) ``` #### Parameters *index* An **int** that indicates the column index. *x* An InputStream object. *length* An **int** that indicates the length of the stream. ## Exceptions [SQLServerException](../../../connect/jdbc/reference/sqlserverexception-class.md) ## Remarks This updateAsciiStream method is specified by the updateAsciiStream method in the java.sql.ResultSet interface. This method passes ASCII characters (bytes) from an InputStream object to convertible character columns, which are the ASCII range [0x00 - 0x7F] of Unicode, and 874, 932, 936, 949, 950, and 1250 through 1258 code pages. This method performs a conversion to the destination collation page. Trying to update an unconvertible destination column will cause an exception to be thrown. For binary columns, raw bytes are passed. 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 [updateAsciiStream Method (int, java.io.InputStream)](../../../connect/jdbc/reference/updateasciistream-method-int-java-io-inputstream.md) when the application wants to update the column from a stream whose length is unknown. ## See Also [updateAsciiStream Method (SQLServerResultSet)](../../../connect/jdbc/reference/updateasciistream-method-sqlserverresultset.md) [SQLServerResultSet Members](../../../connect/jdbc/reference/sqlserverresultset-members.md) [SQLServerResultSet Class](../../../connect/jdbc/reference/sqlserverresultset-class.md)