Android.Database.Sqlite.SQLiteDatabase.BeginTransactionWithListenerNonExclusive Method
Begins a transaction in IMMEDIATE mode.

Syntax

[Android.Runtime.Register("beginTransactionWithListenerNonExclusive", "(Landroid/database/sqlite/SQLiteTransactionListener;)V", "GetBeginTransactionWithListenerNonExclusive_Landroid_database_sqlite_SQLiteTransactionListener_Handler")]
public virtual void BeginTransactionWithListenerNonExclusive (ISQLiteTransactionListener transactionListener)

Parameters

transactionListener
listener that should be notified when the transaction begins, commits, or is rolled back, either explicitly or by a call to SQLiteDatabase.YieldIfContendedSafely.

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:

java Example

   db.beginTransactionWithListenerNonExclusive(listener);
   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 11