Compartir a través de


setCharacterStream Method (java.lang.String, java.io.Reader, long) (SQLServerCallableStatement)

Sets the designated parameter to the specified java.io.Reader object, which is the specified number of characters long.

Nota

This feature is introduced starting with the Microsoft SQL Server JDBC Driver version 2.0.

public final void setCharacterStream(java.lang.String parameterName
                        java.io.Reader reader,
                        long length)

Parámetros

parameterName

A String that contains the parameter name.

reader

A Reader object that contains the Unicode data.

length

A long that indicates the number of characters in the stream.

Excepciones

SQLServerException

Observaciones

This setCharacterStream method is specified by the setCharacterStream method in the java.sql.CallableStatement interface.

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 setCharacterStream Method (java.lang.String, java.io.Reader) when the application wants to update the column from a stream whose length is unknown.

Vea también

Conceptos

setCharacterStream Method (SQLServerCallableStatement)
SQLServerCallableStatement Methods
SQLServerCallableStatement Members