dimanche 13 mars 2016

Searching through a dialogue

I´m trying to search a value with my dialog.This dialog have special class:

          public void onClick(DialogInterface dialog, int id) {
                        Dialog f = (Dialog) dialog;
                        EditText inputTemp = (EditText) f.findViewById(R.id.ediactor);
                        String searchStr = inputTemp.getText().toString();

                        Cursor c = DatabaseHelper.rawQuery("SELECT Id, Name, Price FROM "+TABLA_NOMBRE+" WHERE Name like '"+searchStr+"'", null);

//error in  rawQuery and the name of the table TABLA_NOMBRE

                        dialog.cancel();
                    }
                });

Aucun commentaire:

Enregistrer un commentaire