Share via


ICallableStatement.RegisterOutParameter Method

Definition

Overloads

RegisterOutParameter(Int32, Int32)

Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.

RegisterOutParameter(String, Int32)

Registers the OUT parameter named parameterName to the JDBC type sqlType.

RegisterOutParameter(Int32, Int32, Int32)

Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.

RegisterOutParameter(Int32, Int32, String)

Registers the designated output parameter.

RegisterOutParameter(String, Int32, Int32)

Registers the parameter named parameterName to be of JDBC type sqlType.

RegisterOutParameter(String, Int32, String)

Registers the designated output parameter.

RegisterOutParameter(Int32, Int32)

Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType.

[Android.Runtime.Register("registerOutParameter", "(II)V", "GetRegisterOutParameter_IIHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void RegisterOutParameter (int parameterIndex, int sqlType);
[<Android.Runtime.Register("registerOutParameter", "(II)V", "GetRegisterOutParameter_IIHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RegisterOutParameter : int * int -> unit

Parameters

parameterIndex
Int32

the first parameter is 1, the second is 2, and so on

sqlType
Int32

the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the OUT parameter in ordinal position parameterIndex to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method #getObject retrieves the value.

Java documentation for java.sql.CallableStatement.registerOutParameter(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.

See also

Applies to

RegisterOutParameter(String, Int32)

Registers the OUT parameter named parameterName to the JDBC type sqlType.

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

Parameters

parameterName
String

the name of the parameter

sqlType
Int32

the JDBC type code defined by java.sql.Types. If the parameter is of JDBC type NUMERIC or DECIMAL, the version of registerOutParameter that accepts a scale value should be used.

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the OUT parameter named parameterName to the JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

If the JDBC type expected to be returned to this output parameter is specific to this particular database, sqlType should be java.sql.Types.OTHER. The method #getObject retrieves the value.

Added in 1.4.

Java documentation for java.sql.CallableStatement.registerOutParameter(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

RegisterOutParameter(Int32, Int32, Int32)

Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType.

[Android.Runtime.Register("registerOutParameter", "(III)V", "GetRegisterOutParameter_IIIHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void RegisterOutParameter (int parameterIndex, int sqlType, int scale);
[<Android.Runtime.Register("registerOutParameter", "(III)V", "GetRegisterOutParameter_IIIHandler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RegisterOutParameter : int * int * int -> unit

Parameters

parameterIndex
Int32

the first parameter is 1, the second is 2, and so on

sqlType
Int32

the SQL type code defined by java.sql.Types.

scale
Int32

the desired number of digits to the right of the decimal point. It must be greater than or equal to zero.

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the parameter in ordinal position parameterIndex to be of JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL.

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

See also

Applies to

RegisterOutParameter(Int32, Int32, String)

Registers the designated output parameter.

[Android.Runtime.Register("registerOutParameter", "(IILjava/lang/String;)V", "GetRegisterOutParameter_IILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void RegisterOutParameter (int parameterIndex, int sqlType, string? typeName);
[<Android.Runtime.Register("registerOutParameter", "(IILjava/lang/String;)V", "GetRegisterOutParameter_IILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RegisterOutParameter : int * int * string -> unit

Parameters

parameterIndex
Int32

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

sqlType
Int32

a value from java.sql.Types

typeName
String

the fully-qualified name of an SQL structured type

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-defined or REF output parameter. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

All OUT parameters must be registered before a stored procedure is executed.

For a user-defined parameter, the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-defined and REF parameters.

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

<B>Note:</B> When reading the value of an out parameter, you must use the getter method whose Java type corresponds to the parameter's registered SQL type.

Added in 1.2.

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

RegisterOutParameter(String, Int32, Int32)

Registers the parameter named parameterName to be of JDBC type sqlType.

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

Parameters

parameterName
String

the name of the parameter

sqlType
Int32

SQL type code defined by java.sql.Types.

scale
Int32

the desired number of digits to the right of the decimal point. It must be greater than or equal to zero.

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the parameter named parameterName to be of JDBC type sqlType. All OUT parameters must be registered before a stored procedure is executed.

The JDBC type specified by sqlType for an OUT parameter determines the Java type that must be used in the get method to read the value of that parameter.

This version of registerOutParameter should be used when the parameter is of JDBC type NUMERIC or DECIMAL.

Added in 1.4.

Java documentation for java.sql.CallableStatement.registerOutParameter(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

RegisterOutParameter(String, Int32, String)

Registers the designated output parameter.

[Android.Runtime.Register("registerOutParameter", "(Ljava/lang/String;ILjava/lang/String;)V", "GetRegisterOutParameter_Ljava_lang_String_ILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void RegisterOutParameter (string? parameterName, int sqlType, string? typeName);
[<Android.Runtime.Register("registerOutParameter", "(Ljava/lang/String;ILjava/lang/String;)V", "GetRegisterOutParameter_Ljava_lang_String_ILjava_lang_String_Handler:Java.Sql.ICallableStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member RegisterOutParameter : 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 structured type

Attributes

Exceptions

if a database error occurs.

Remarks

Registers the designated output parameter. This version of the method registerOutParameter should be used for a user-named or REF output parameter. Examples of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.

All OUT parameters must be registered before a stored procedure is executed.

For a user-named parameter the fully-qualified SQL type name of the parameter should also be given, while a REF parameter requires that the fully-qualified type name of the referenced type be given. A JDBC driver that does not need the type code and type name information may ignore it. To be portable, however, applications should always provide these values for user-named and REF parameters.

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

<B>Note:</B> When reading the value of an out parameter, you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

Added in 1.4.

Java documentation for java.sql.CallableStatement.registerOutParameter(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.

Applies to