mercredi 7 janvier 2015

How can we ignore the apostrophe (') in like query of ormlite

My code is:-



QueryBuilder<PatientDetails, Integer> qb = patientDao.queryBuilder();
qb.where().like("patientname", "%" + searchItem + "%");
patientsDetailsLit = patientDao.query(qb.prepare());


if searchItem content apostrophe (') then code will crash.


Aucun commentaire:

Enregistrer un commentaire