Compartir a través de


SQLiteQueryBuilder.Update Method

Definition

Perform an update by combining all current settings and the information passed into this method.

[Android.Runtime.Register("update", "(Landroid/database/sqlite/SQLiteDatabase;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "GetUpdate_Landroid_database_sqlite_SQLiteDatabase_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_Handler", ApiSince=29)]
public virtual int Update (Android.Database.Sqlite.SQLiteDatabase db, Android.Content.ContentValues values, string? selection, string[]? selectionArgs);
[<Android.Runtime.Register("update", "(Landroid/database/sqlite/SQLiteDatabase;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "GetUpdate_Landroid_database_sqlite_SQLiteDatabase_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_Handler", ApiSince=29)>]
abstract member Update : Android.Database.Sqlite.SQLiteDatabase * Android.Content.ContentValues * string * string[] -> int
override this.Update : Android.Database.Sqlite.SQLiteDatabase * Android.Content.ContentValues * string * string[] -> int

Parameters

db
SQLiteDatabase

the database to update on

values
ContentValues
selection
String

A filter declaring which rows to return, formatted as an SQL WHERE clause (excluding the WHERE itself). Passing null will return all rows for the given URL.

selectionArgs
String[]

You may include ?s in selection, which will be replaced by the values from selectionArgs, in order that they appear in the selection. The values will be bound as Strings.

Returns

the number of rows updated

Attributes

Remarks

Perform an update by combining all current settings and the information passed into this method.

Java documentation for android.database.sqlite.SQLiteQueryBuilder.update(android.database.sqlite.SQLiteDatabase, android.content.ContentValues, java.lang.String, 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