Android.Database.Sqlite.SQLiteDatabase.BeginTransaction Method
Begins a transaction in EXCLUSIVE mode.

Syntax

[Android.Runtime.Register("beginTransaction", "()V", "GetBeginTransactionHandler")]
public virtual void BeginTransaction ()

Remarks

Begins a transaction in EXCLUSIVE 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:

java Example

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

[Android Documentation]

Requirements

Namespace: Android.Database.Sqlite
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1