SQLiteDatabase.BeginTransactionNonExclusive Method

Definition

Begins a transaction in IMMEDIATE mode.

[Android.Runtime.Register("beginTransactionNonExclusive", "()V", "GetBeginTransactionNonExclusiveHandler")]
public virtual void BeginTransactionNonExclusive ();
[<Android.Runtime.Register("beginTransactionNonExclusive", "()V", "GetBeginTransactionNonExclusiveHandler")>]
abstract member BeginTransactionNonExclusive : unit -> unit
override this.BeginTransactionNonExclusive : unit -> unit
Attributes

Remarks

Begins a transaction in IMMEDIATE mode. Transactions can be nested. When the outer transaction is ended all of the work done in that transaction and all of the nested transactions will be committed or rolled back. The changes will be rolled back if any transaction is ended without being marked as clean (by calling setTransactionSuccessful). Otherwise they will be committed.

Here is the standard idiom for transactions:

db.beginTransactionNonExclusive();
              try {
                ...
                db.setTransactionSuccessful();
              } finally {
                db.endTransaction();
              }

Java documentation for android.database.sqlite.SQLiteDatabase.beginTransactionNonExclusive().

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