Code example for SQLiteDatabase

Methods: isOpenisReadOnly, close

0
	/** 
	 * Open database by writable mode, if needed. 
	 */ 
	protected void openWritable() { 
 
		if (mDb != null && mDb.isOpen()) {
 
			if (!mDb.isReadOnly())
				return; 
 
			mDb.close();
 
		} 
 
		mDb = getWritableDatabase();
 
	} 
 
	/** 
	 * Get database controller. Override is required on sub-class. Sub-class 
	 * returns extending database controller.