共用方式為


IPreparedStatement.SetCharacterStream Method

Definition

Overloads

SetCharacterStream(Int32, Reader)

Sets the designated parameter to the given Reader object.

SetCharacterStream(Int32, Reader, Int32)

Sets the designated parameter to the given Reader object, which is the given number of characters long.

SetCharacterStream(Int32, Reader, Int64)

Sets the designated parameter to the given Reader object, which is the given number of characters long.

SetCharacterStream(Int32, Reader)

Sets the designated parameter to the given Reader object.

[Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;)V", "GetSetCharacterStream_ILjava_io_Reader_Handler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetCharacterStream (int parameterIndex, Java.IO.Reader? reader);
[<Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;)V", "GetSetCharacterStream_ILjava_io_Reader_Handler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetCharacterStream : int * Java.IO.Reader -> unit

Parameters

parameterIndex
Int32

the first parameter is 1, the second is 2, ...

reader
Reader

the java.io.Reader object that contains the Unicode data

Attributes

Exceptions

if a database error happens.

Remarks

Sets the designated parameter to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

<B>Note:</B> This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

<B>Note:</B> Consult your JDBC driver documentation to determine if it might be more efficient to use a version of setCharacterStream which takes a length parameter.

Added in 1.6.

Java documentation for java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetCharacterStream(Int32, Reader, Int32)

Sets the designated parameter to the given Reader object, which is the given number of characters long.

[Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;I)V", "GetSetCharacterStream_ILjava_io_Reader_IHandler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetCharacterStream (int parameterIndex, Java.IO.Reader? reader, int length);
[<Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;I)V", "GetSetCharacterStream_ILjava_io_Reader_IHandler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetCharacterStream : int * Java.IO.Reader * int -> unit

Parameters

parameterIndex
Int32

the first parameter is 1, the second is 2, ...

reader
Reader

the java.io.Reader object that contains the Unicode data

length
Int32

the number of characters in the stream

Attributes

Exceptions

if a database error happens.

Remarks

Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

<B>Note:</B> This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Added in 1.2.

Java documentation for java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetCharacterStream(Int32, Reader, Int64)

Sets the designated parameter to the given Reader object, which is the given number of characters long.

[Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;J)V", "GetSetCharacterStream_ILjava_io_Reader_JHandler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetCharacterStream (int parameterIndex, Java.IO.Reader? reader, long length);
[<Android.Runtime.Register("setCharacterStream", "(ILjava/io/Reader;J)V", "GetSetCharacterStream_ILjava_io_Reader_JHandler:Java.Sql.IPreparedStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetCharacterStream : int * Java.IO.Reader * int64 -> unit

Parameters

parameterIndex
Int32

the first parameter is 1, the second is 2, ...

reader
Reader

the java.io.Reader object that contains the Unicode data

length
Int64

the number of characters in the stream

Attributes

Exceptions

if a database error happens.

Remarks

Sets the designated parameter to the given Reader object, which is the given number of characters long. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

<B>Note:</B> This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Added in 1.6.

Java documentation for java.sql.PreparedStatement.setCharacterStream(int, java.io.Reader, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to