problem while retrieving data from sqlite
Good Morning To All!:(handshake):
i am facing an problem with sqlite..,
while user type on my search box (EditText) it have to retrieve the information from database..,
for example if he want's to search begin with polaris
it should filter Like Query in data Base
ponmar
poligton,
posilas,
etc..,
my code for database handler
Code:
public void serchlike()
{
String nm=((EditText)findViewById(R.id.editText1)).getText().toString();
String[] argList = {"'%%%%"+nm+"%%%%'"};
String select = "Select id from SearchApplication Where(id like " + argList +")";
}
My code for on the class
Code:
ed = (EditText)findViewById(R.id.editText1);
ed.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
db.serchlike();
return false;
}
});
what i have to do..,
can anyone guide me please..,