Freigeben über


DatabaseUtils.InsertHelper.Execute Method

Definition

Caution

deprecated

Execute the previously prepared insert or replace using the bound values since the last call to prepareForInsert or prepareForReplace.

[Android.Runtime.Register("execute", "()J", "GetExecuteHandler")]
[System.Obsolete("deprecated")]
public virtual long Execute ();
[<Android.Runtime.Register("execute", "()J", "GetExecuteHandler")>]
[<System.Obsolete("deprecated")>]
abstract member Execute : unit -> int64
override this.Execute : unit -> int64

Returns

the row ID of the newly inserted row, or -1 if an error occurred

Attributes

Remarks

Execute the previously prepared insert or replace using the bound values since the last call to prepareForInsert or prepareForReplace.

Note that calling bind() and then execute() is not thread-safe. The only thread-safe way to use this class is to call insert() or replace().

Java documentation for android.database.DatabaseUtils.InsertHelper.execute().

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