Code example for DatabaseUtils.InsertHelper

Methods: bind, execute, prepareForInsert

0
	 */ 
	public int addLicenseLevelRecordFast(int qid, String liclevel) {
		if (mDB == null) {
			throw new TeuriaSQLException("The DB is not in fast questions insertion mode"); 
		} 
		mLiclevelsInsertHelper.prepareForInsert();
		mLiclevelsInsertHelper.bind(mLiclevelsQidColumn, qid);
		mLiclevelsInsertHelper.bind(mLiclevelsLiclevelColumn, liclevel);
 
		return (int)mLiclevelsInsertHelper.execute();
	} 
 
	/** 
	 * Restore the DB to normal mode. 
	 */ 
	public void finishAddQuestions() { 
		if (mDB == null) {
			throw new TeuriaSQLException("The DB is not in fast questions insertion mode"); 
		} 
		mDB.setTransactionSuccessful();