SQLiteDatabase.Replace(String, String, ContentValues) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Convenience method for replacing a row in the database.
[Android.Runtime.Register("replace", "(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J", "GetReplace_Ljava_lang_String_Ljava_lang_String_Landroid_content_ContentValues_Handler")]
public virtual long Replace (string? table, string? nullColumnHack, Android.Content.ContentValues? initialValues);
[<Android.Runtime.Register("replace", "(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J", "GetReplace_Ljava_lang_String_Ljava_lang_String_Landroid_content_ContentValues_Handler")>]
abstract member Replace : string * string * Android.Content.ContentValues -> int64
override this.Replace : string * string * Android.Content.ContentValues -> int64
Parameters
- table
- String
the table in which to replace the row
- nullColumnHack
- String
optional; may be <code>null</code>. SQL doesn't allow inserting a completely empty row without naming at least one column name. If your provided <code>initialValues</code> is empty, no column names are known and an empty row can't be inserted. If not set to null, the <code>nullColumnHack</code> parameter provides the name of nullable column name to explicitly insert a NULL into in the case where your <code>initialValues</code> is empty.
- initialValues
- ContentValues
this map contains the initial column values for the row. The keys should be the column names and the values the column values.
Returns
the row ID of the newly inserted row, or -1 if an error occurred
- Attributes
Remarks
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.