Code example for SQLiteDatabase

Methods: rawQuery

0
		Log.trace("Executing: %s", q);
		 
		Cursor cur = null;
		 
		try { 
			cur = db.rawQuery(q.getExecutableSql(), null);
			 
			if (!cur.moveToNext()){
				return null; 
			} else { 
				return cur.getString(0);
			} 
		} catch (SQLiteException e) {
			throwError(e);
			return null; 
		} finally { 
			if (cur != null)
				cur.close();
		} 
	}