Code example for DatabaseUtils.InsertHelper

Methods: bind, execute, prepareForInsert

0
	 */ 
	public int initAnswerRecordFast(int questionID) {
		if (mDB == null) {
			throw new TeuriaSQLException("The DB is not in fast questions insertion mode"); 
		} 
		mAnswersInsertHelper.prepareForInsert();
		mAnswersInsertHelper.bind(mIHanswerQidColumn, questionID);
		mAnswersInsertHelper.bind(mIHanswerStatusColumn, 0);   // Question was not presented to the user
		return (int)mAnswersInsertHelper.execute();
	} 
 
	/** 
	 * Associate another driving license level with a question 
	 * @param qid - the question for which we want to associate another license level 
	 * @param liclevel - the license level string 
	 * @return - the _id of the newly-added association record 
	 */ 
	public int addLicenseLevelRecordFast(int qid, String liclevel) {
		if (mDB == null) {
			throw new TeuriaSQLException("The DB is not in fast questions insertion mode"); 
Contextual code suggestions in your IDE  Get Codota for Java