Share via


IRowSet.SetObject Method

Definition

Overloads

SetObject(Int32, Object, Int32, Int32)

Sets the designated parameter in this RowSet object's command with the given Java Object.

SetObject(String, Object, Int32, Int32)

Sets the value of the designated parameter with the given object.

SetObject(Int32, Object, Int32)

Sets the designated parameter in this RowSet object's command with a Java Object.

SetObject(String, Object)

Sets the value of the designated parameter with the given object.

SetObject(Int32, Object)

Sets the designated parameter in this RowSet object's command with a Java Object.

SetObject(String, Object, Int32)

Sets the value of the designated parameter with the given object.

SetObject(Int32, Object, Int32, Int32)

Sets the designated parameter in this RowSet object's command with the given Java Object.

[Android.Runtime.Register("setObject", "(ILjava/lang/Object;II)V", "GetSetObject_ILjava_lang_Object_IIHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (int parameterIndex, Java.Lang.Object? x, int targetSqlType, int scaleOrLength);
[<Android.Runtime.Register("setObject", "(ILjava/lang/Object;II)V", "GetSetObject_ILjava_lang_Object_IIHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : int * Java.Lang.Object * int * int -> unit

Parameters

parameterIndex
Int32

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

x
Object

the object containing the input parameter value

targetSqlType
Int32

the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.

scaleOrLength
Int32

for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For Java Object types InputStream and Reader, this is the length of the data in the stream or reader. For all other types, this value will be ignored.

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the designated parameter in this RowSet object's command with the given Java Object. For integral values, the java.lang equivalent objects should be used (for example, an instance of the class Integer for an int).

If the second argument is an InputStream then the stream must contain the number of bytes specified by scaleOrLength. If the second argument is a Reader then the reader must contain the number of characters specified * by scaleOrLength. If these conditions are not true the driver will generate a SQLException when the prepared statement is executed.

The given Java object will be converted to the targetSqlType before being sent to the database.

If the object is of a class implementing SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase-specific abstract data types.

Java documentation for javax.sql.RowSet.setObject(int, java.lang.Object, 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

SetObject(String, Object, Int32, Int32)

Sets the value of the designated parameter with the given object.

[Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;II)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_IIHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (string? parameterName, Java.Lang.Object? x, int targetSqlType, int scale);
[<Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;II)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_IIHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : string * Java.Lang.Object * int * int -> unit

Parameters

parameterName
String

the name of the parameter

x
Object

the object containing the input parameter value

targetSqlType
Int32

the SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.

scale
Int32

for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point. For all other types, this value will be ignored.

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the value of the designated parameter with the given object. The second argument must be an object type; for integral values, the java.lang equivalent objects should be used.

The given Java object will be converted to the given targetSqlType before being sent to the database.

If the object has a custom mapping (is of a class implementing the interface SQLData), the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

Note that this method may be used to pass datatabase- specific abstract data types.

Added in 1.4.

Java documentation for javax.sql.RowSet.setObject(java.lang.String, java.lang.Object, 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

SetObject(Int32, Object, Int32)

Sets the designated parameter in this RowSet object's command with a Java Object.

[Android.Runtime.Register("setObject", "(ILjava/lang/Object;I)V", "GetSetObject_ILjava_lang_Object_IHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (int parameterIndex, Java.Lang.Object? x, int targetSqlType);
[<Android.Runtime.Register("setObject", "(ILjava/lang/Object;I)V", "GetSetObject_ILjava_lang_Object_IHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : int * Java.Lang.Object * int -> unit

Parameters

parameterIndex
Int32

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

x
Object

the object containing the input parameter value

targetSqlType
Int32

the SQL type (as defined in java.sql.Types) to be sent to the database

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used. This method is like setObject above, but the scale used is the scale of the second parameter. Scalar values have a scale of zero. Literal values have the scale present in the literal.

Even though it is supported, it is not recommended that this method be called with floating point input values.

Java documentation for javax.sql.RowSet.setObject(int, java.lang.Object, 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

SetObject(String, Object)

Sets the value of the designated parameter with the given object.

[Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_Handler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (string? parameterName, Java.Lang.Object? x);
[<Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_Handler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : string * Java.Lang.Object -> unit

Parameters

parameterName
String

the name of the parameter

x
Object

the object containing the input parameter value

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the value of the designated parameter with the given object. The second parameter must be of type Object; therefore, the java.lang equivalent objects should be used for built-in types.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase- specific abstract data types, by using a driver-specific Java type.

If the object is of a class implementing the interface SQLData, the JDBC driver should call the method SQLData.writeSQL to write it to the SQL data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

This method throws an exception if there is an ambiguity, for example, if the object is of a class implementing more than one of the interfaces named above.

Added in 1.4.

Java documentation for javax.sql.RowSet.setObject(java.lang.String, java.lang.Object).

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

SetObject(Int32, Object)

Sets the designated parameter in this RowSet object's command with a Java Object.

[Android.Runtime.Register("setObject", "(ILjava/lang/Object;)V", "GetSetObject_ILjava_lang_Object_Handler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (int parameterIndex, Java.Lang.Object? x);
[<Android.Runtime.Register("setObject", "(ILjava/lang/Object;)V", "GetSetObject_ILjava_lang_Object_Handler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : int * Java.Lang.Object -> unit

Parameters

parameterIndex
Int32

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

x
Object

The object containing the input parameter value

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the designated parameter in this RowSet object's command with a Java Object. For integral values, the java.lang equivalent objects should be used.

The JDBC specification provides a standard mapping from Java Object types to SQL types. The driver will convert the given Java object to its standard SQL mapping before sending it to the database.

Note that this method may be used to pass datatabase-specific abstract data types by using a driver-specific Java type.

If the object is of a class implementing SQLData, the rowset should call the method SQLData.writeSQL to write the object to an SQLOutput data stream. If, on the other hand, the object is of a class implementing Ref, Blob, Clob, NClob, Struct, java.net.URL, or Array, the driver should pass it to the database as a value of the corresponding SQL type.

An exception is thrown if there is an ambiguity, for example, if the object is of a class implementing more than one of these interfaces.

Java documentation for javax.sql.RowSet.setObject(int, java.lang.Object).

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

SetObject(String, Object, Int32)

Sets the value of the designated parameter with the given object.

[Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;I)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_IHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetObject (string? parameterName, Java.Lang.Object? x, int targetSqlType);
[<Android.Runtime.Register("setObject", "(Ljava/lang/String;Ljava/lang/Object;I)V", "GetSetObject_Ljava_lang_String_Ljava_lang_Object_IHandler:Javax.Sql.IRowSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetObject : string * Java.Lang.Object * int -> unit

Parameters

parameterName
String

the name of the parameter

x
Object

the object containing the input parameter value

targetSqlType
Int32

the SQL type (as defined in java.sql.Types) to be sent to the database

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the value of the designated parameter with the given object. This method is like the method setObject above, except that it assumes a scale of zero.

Added in 1.4.

Java documentation for javax.sql.RowSet.setObject(java.lang.String, java.lang.Object, 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