Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. String path = myContext.getExternalFilesDir(null).getAbsolutePath() + File.separator + DB_NAME;
  2. myDataBase = SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.OPEN_READWRITE);
  3.  
  4. Cursor cur = myDataBase.rawQuery("SELECT * FROM employee WHERE employee match ? " +
  5. "ORDER BY firstname, lastname LIMIT 100",
  6. new String[] { "*" + queryString+ "*" });
  7.  
  8. while (cur.moveToNext()) {
  9. persons.add(getPerson(cur)); // never reaches this since API 21
  10. }
  11. cur.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement