共用方式為


updateBinaryStream Method (int, java.io.InputStream, int)

Updates the designated column with a binary stream value given the column index.

public void updateBinaryStream(int index,
                               java.io.InputStream x,
                               int length)

參數

index

An int that indicates the column index.

x

An InputStream object.

length

An int that indicates the length of the stream.

例外狀況

SQLServerException

備註

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 SQL Server 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.

When the length is set to -1, the stream is allowed, but a specific length is not required. If the InputStream passes a stream of a different length than what is specified, the JDBC driver will stop the update while it tries to preserve the connection and the current transaction.

另請參閱

參考

SQLServerResultSet Class

概念

updateBinaryStream Method (SQLServerResultSet)
SQLServerResultSet Methods
SQLServerResultSet Members