語言

SQLiteDatabase.Update(String, ContentValues, String, String[]) 方法

定義

方便地更新資料庫中資料列的方法。

[Android.Runtime.Register("update", "(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "GetUpdate_Ljava_lang_String_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_Handler")]
public virtual int Update(string table, Android.Content.ContentValues? values, string? whereClause, string[]? whereArgs);
[<Android.Runtime.Register("update", "(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I", "GetUpdate_Ljava_lang_String_Landroid_content_ContentValues_Ljava_lang_String_arrayLjava_lang_String_Handler")>]
abstract member Update : string * Android.Content.ContentValues * string * string[] -> int
override this.Update : string * Android.Content.ContentValues * string * string[] -> int

參數

table
String

更新表格

values
ContentValues

從欄位名稱映射到新欄位值。 null 是一個有效的值,會被轉換成 NULL。

whereClause
String

更新時可選的 WHERE 條款。 通過 null 會更新所有列。

whereArgs
String[]

你可以在 where 子句中加入 ?s,這些 ?s 會被 whereArgs 的值取代。 這些值會被綁定為字串。 如果 whereClause 是空或不包含 ,則其中 Args 可能是空。

傳回

受影響的行數

屬性

備註

方便地更新資料庫中資料列的方法。

Java 文件 android.database.sqlite.SQLiteDatabase.update(java.lang.String, android.content.ContentValues, java.lang.String, java.lang.String[])。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於