title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | apilocation | apiname | apitype |
---|---|---|---|---|---|---|---|---|---|---|
updateBinaryStream Method (int, java.io.InputStream, int) |
updateBinaryStream Method (int, java.io.InputStream, int) |
David-Engel |
davidengel |
01/19/2017 |
sql |
connectivity |
reference |
sqljdbc.jar |
SQLServerResultSet.updateBinaryStream (int, java.io.InputStream, int) |
Assembly |
[!INCLUDEDriver_JDBC_Download]
Updates the designated column with a binary stream value, which will have the specified number of bytes.
public void updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
columnIndex
An int that indicates the column index.
x
An InputStream object.
length
An int that indicates the length of the stream.
This updateBinaryStream method is specified by the updateBinaryStream method in the java.sql.ResultSet interface.
This method passes bytes from an InputStream object to selected [!INCLUDEssNoVersion] binary columns such as binary, varbinary, varbinary(max), image, xml, and udt. Updating character columns is not supported with this method. To update character columns with an InputStream, use the updateAsciiStream method.
If the length of the stream is different than that 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 updateBinaryStream Method (int, java.io.InputStream) when the application wants to update the column from a stream whose length is unknown.
updateBinaryStream Method (SQLServerResultSet)
SQLServerResultSet Members
SQLServerResultSet Class