Code example for SQLiteDatabase

Methods: beginTransactionendTransactionexecSQLsetTransactionSuccessful, close

0
		adoHelper = new ADOHelper(context); 
	} 
 
	public boolean addUserMail(String mail) { 
		db = adoHelper.getWritableDatabase(); 
		db.beginTransaction(); 
		try { 
			db.execSQL("INSERT INTO usermail VALUES(NULL,?)", 
					new Object[] { mail }); 
			db.setTransactionSuccessful(); 
		} catch (SQLException e) { 
			return false; 
		} finally { 
			db.endTransaction(); 
			db.close(); 
			db = null; 
		} 
		return true; 
	} 
 
	public boolean deleteUserMail(String mail) {