Compartir a través de


SQLiteStatement.ExecuteInsert Method

Definition

Execute this SQL statement and return the ID of the row inserted due to this call.

[Android.Runtime.Register("executeInsert", "()J", "GetExecuteInsertHandler")]
public virtual long ExecuteInsert ();
[<Android.Runtime.Register("executeInsert", "()J", "GetExecuteInsertHandler")>]
abstract member ExecuteInsert : unit -> int64
override this.ExecuteInsert : unit -> int64

Returns

the row ID of the last row inserted, if this insert is successful. -1 otherwise.

Attributes

Exceptions

If the SQL string is invalid for some reason

Remarks

Execute this SQL statement and return the ID of the row inserted due to this call. The SQL statement should be an INSERT for this to be a useful call.

Java documentation for android.database.sqlite.SQLiteStatement.executeInsert().

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