Condividi tramite


ICallableStatement.SetNull Method

Definition

Overloads

SetNull(String, Int32, String)

Sets the designated parameter to SQL NULL.

SetNull(String, Int32)

Sets the designated parameter to SQL NULL.

SetNull(String, Int32, String)

Sets the designated parameter to SQL NULL.

[Android.Runtime.Register("setNull", "(Ljava/lang/String;ILjava/lang/String;)V", "GetSetNull_Ljava_lang_String_ILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetNull (string? parameterName, int sqlType, string? typeName);
[<Android.Runtime.Register("setNull", "(Ljava/lang/String;ILjava/lang/String;)V", "GetSetNull_Ljava_lang_String_ILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetNull : string * int * string -> unit

Parameters

parameterName
String

the name of the parameter

sqlType
Int32

a value from java.sql.Types

typeName
String

the fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or SQL REF value

Attributes

Exceptions

if a database error occurs.

Remarks

Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

<B>Note:</B> To be portable, applications must give the SQL type code and the fully-qualified SQL type name when specifying a NULL user-defined or REF parameter. In the case of a user-defined type the name is the type name of the parameter itself. For a REF parameter, the name is the type name of the referenced type.

Although it is intended for user-defined and Ref parameters, this method may be used to set a null parameter of any JDBC type. If the parameter does not have a user-defined or REF type, the given typeName is ignored.

Added in 1.4.

Java documentation for java.sql.CallableStatement.setNull(java.lang.String, int, 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.

See also

Applies to

SetNull(String, Int32)

Sets the designated parameter to SQL NULL.

[Android.Runtime.Register("setNull", "(Ljava/lang/String;I)V", "GetSetNull_Ljava_lang_String_IHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetNull (string? parameterName, int sqlType);
[<Android.Runtime.Register("setNull", "(Ljava/lang/String;I)V", "GetSetNull_Ljava_lang_String_IHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetNull : string * int -> unit

Parameters

parameterName
String

the name of the parameter

sqlType
Int32

the SQL type code defined in java.sql.Types

Attributes

Exceptions

if a database error occurs.

Remarks

Sets the designated parameter to SQL NULL.

<B>Note:</B> You must specify the parameter's SQL type.

Added in 1.4.

Java documentation for java.sql.CallableStatement.setNull(java.lang.String, 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