IConnection.PrepareCall Method

Definition

Overloads

PrepareCall(String, Int32, Int32, Int32)

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

PrepareCall(String, Int32, Int32)

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

PrepareCall(String)

Creates a CallableStatement object for calling database stored procedures.

PrepareCall(String, Int32, Int32, Int32)

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

[Android.Runtime.Register("prepareCall", "(Ljava/lang/String;III)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_IIIHandler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.ICallableStatement? PrepareCall (string? sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability);
[<Android.Runtime.Register("prepareCall", "(Ljava/lang/String;III)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_IIIHandler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member PrepareCall : string * int * int * int -> Java.Sql.ICallableStatement

Parameters

sql
String

a String object that is the SQL statement to be sent to the database; may contain on or more '?' parameters

resultSetType
Int32

one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE

resultSetConcurrency
Int32

one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE

resultSetHoldability
Int32

one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT

Returns

a new CallableStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability

Attributes

Exceptions

if a problem occurs accessing the database.

Remarks

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type, result set concurrency type and holdability to be overridden.

Added in 1.4.

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

Applies to

PrepareCall(String, Int32, Int32)

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.

[Android.Runtime.Register("prepareCall", "(Ljava/lang/String;II)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_IIHandler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.ICallableStatement? PrepareCall (string? sql, int resultSetType, int resultSetConcurrency);
[<Android.Runtime.Register("prepareCall", "(Ljava/lang/String;II)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_IIHandler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member PrepareCall : string * int * int -> Java.Sql.ICallableStatement

Parameters

sql
String

a String object that is the SQL statement to be sent to the database; may contain on or more '?' parameters

resultSetType
Int32

a result set type; one of ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE

resultSetConcurrency
Int32

a concurrency type; one of ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE

Returns

a new CallableStatement object containing the pre-compiled SQL statement that will produce ResultSet objects with the given type and concurrency

Attributes

Exceptions

if a problem occurs accessing the database

Remarks

Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency. This method is the same as the prepareCall method above, but it allows the default result set type and concurrency to be overridden. The holdability of the created result sets can be determined by calling #getHoldability.

Added in 1.2.

Java documentation for java.sql.Connection.prepareCall(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

PrepareCall(String)

Creates a CallableStatement object for calling database stored procedures.

[Android.Runtime.Register("prepareCall", "(Ljava/lang/String;)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_Handler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Sql.ICallableStatement? PrepareCall (string? sql);
[<Android.Runtime.Register("prepareCall", "(Ljava/lang/String;)Ljava/sql/CallableStatement;", "GetPrepareCall_Ljava_lang_String_Handler:Java.Sql.IConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member PrepareCall : string -> Java.Sql.ICallableStatement

Parameters

sql
String

an SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is specified using JDBC call escape syntax.

Returns

a new default CallableStatement object containing the pre-compiled SQL statement

Attributes

Exceptions

if a problem occurs accessing the database.

Remarks

Creates a CallableStatement object for calling database stored procedures. The CallableStatement object provides methods for setting up its IN and OUT parameters, and methods for executing the call to a stored procedure.

<B>Note:</B> This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the method prepareCall is done; others may wait until the CallableStatement object is executed. This has no direct effect on users; however, it does affect which method throws certain SQLExceptions.

Result sets created using the returned CallableStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY. The holdability of the created result sets can be determined by calling #getHoldability.

Java documentation for java.sql.Connection.prepareCall(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