Dela via


IClob.SetString Method

Definition

Overloads

SetString(Int64, String)

Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

SetString(Int64, String, Int32, Int32)

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

SetString(Int64, String)

Writes the given Java String to the CLOB value that this Clob object designates at the position pos.

[Android.Runtime.Register("setString", "(JLjava/lang/String;)I", "GetSetString_JLjava_lang_String_Handler:Java.Sql.IClobInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int SetString (long pos, string? str);
[<Android.Runtime.Register("setString", "(JLjava/lang/String;)I", "GetSetString_JLjava_lang_String_Handler:Java.Sql.IClobInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetString : int64 * string -> int

Parameters

pos
Int64

the position at which to start writing to the CLOB value that this Clob object represents; The first position is 1

str
String

the string to be written to the CLOB value that this Clob designates

Returns

the number of characters written

Attributes

Exceptions

if an error occurs accessing the Clob.

Remarks

Writes the given Java String to the CLOB value that this Clob object designates at the position pos. The string will overwrite the existing characters in the Clob object starting at the position pos. If the end of the Clob value is reached while writing the given string, then the length of the Clob value will be increased to accomodate the extra characters.

<b>Note:</b> If the value specified for pos is greater then the length+1 of the CLOB value then the behavior is undefined. Some JDBC drivers may throw a SQLException while other drivers may support this operation.

Added in 1.4.

Java documentation for java.sql.Clob.setString(long, java.lang.String).

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

SetString(Int64, String, Int32, Int32)

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents.

[Android.Runtime.Register("setString", "(JLjava/lang/String;II)I", "GetSetString_JLjava_lang_String_IIHandler:Java.Sql.IClobInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int SetString (long pos, string? str, int offset, int len);
[<Android.Runtime.Register("setString", "(JLjava/lang/String;II)I", "GetSetString_JLjava_lang_String_IIHandler:Java.Sql.IClobInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetString : int64 * string * int * int -> int

Parameters

pos
Int64

the position at which to start writing to this CLOB object; The first position is 1

str
String

the string to be written to the CLOB value that this Clob object represents

offset
Int32

the offset into str to start reading the characters to be written

len
Int32

the number of characters to be written

Returns

the number of characters written

Attributes

Exceptions

if an error occurs accessing the Clob.

Remarks

Writes len characters of str, starting at character offset, to the CLOB value that this Clob represents. The string will overwrite the existing characters in the Clob object starting at the position pos. If the end of the Clob value is reached while writing the given string, then the length of the Clob value will be increased to accomodate the extra characters.

<b>Note:</b> If the value specified for pos is greater then the length+1 of the CLOB value then the behavior is undefined. Some JDBC drivers may throw a SQLException while other drivers may support this operation.

Added in 1.4.

Java documentation for java.sql.Clob.setString(long, java.lang.String, int, 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