Code example for SQLiteCursor

Methods: moveToFirst

0
	} 
	public Cursor query(String tablename, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy)
	{ 
		 
		SQLiteCursor c =  (SQLiteCursor) getReadableDatabase().query(tablename, columns,KEY_SUGGEST_COLUMN_TEXT_1+" LIKE '%"+selection+"%' OR "+KEY_SUGGEST_COLUMN_TEXT_2+" LIKE '%"+selection+"%'",selectionArgs, groupBy, having,orderBy);
		c.moveToFirst();
		 return c;
	} 
	@Override 
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	/*	if(newVersion > oldVersion) 
		{	 
			try { 
				createDataBase(true); 
			} catch (IOException e) { 
				 
				e.printStackTrace(); 
				throw new Error("Error copying building database"); 
			} 
		}*/