IStatement.SetCursorName(String) Method

Definition

Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods.

[Android.Runtime.Register("setCursorName", "(Ljava/lang/String;)V", "GetSetCursorName_Ljava_lang_String_Handler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetCursorName (string? name);
[<Android.Runtime.Register("setCursorName", "(Ljava/lang/String;)V", "GetSetCursorName_Ljava_lang_String_Handler:Java.Sql.IStatementInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetCursorName : string -> unit

Parameters

name
String

the new cursor name, which must be unique within a connection

Attributes

Exceptions

if an error occurs accessing the database.

Remarks

Sets the SQL cursor name to the given String, which will be used by subsequent Statement object execute methods. This name can then be used in SQL positioned update or delete statements to identify the current row in the ResultSet object generated by this statement. If the database does not support positioned update/delete, this method is a noop. To insure that a cursor has the proper isolation level to support updates, the cursor's SELECT statement should have the form SELECT FOR UPDATE. If FOR UPDATE is not present, positioned updates may fail.

<B>Note:</B> By definition, the execution of positioned updates and deletes must be done by a different Statement object than the one that generated the ResultSet object being used for positioning. Also, cursor names must be unique within a connection.

Java documentation for java.sql.Statement.setCursorName(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