Code example for SQLiteDatabase

Methods: beginTransactionendTransactionisOpensetTransactionSuccessful

0
		return mDb; 
	} 
 
	@Override 
	public void runInTransaction(IDbCommand command) {
		if(mDb != null & mDb.isOpen()) {
			Log.d(TAG, "Running in transaction, mDb was not null and was open." );
			try { 
				mDb.beginTransaction(); 
				command.execute(); 
				mDb.setTransactionSuccessful(); 
			} finally { 
				mDb.endTransaction(); 
			} 
		} else { 
			Log.d(TAG, "Could not run in transaction, DB was closed.");
		} 
		 
	}