I have one App working with the dataabase in which the organisation column having the records with the special characters(single quote). I am getting force close error while searching with the special character in the text field.
The code is below:
String name = idValues.getStringExtra("ORGNAME");
String sql ="select orgname from table1 where name like '%"+ name +"%' Order by org.name";
Please help me with the samplecode/links to search with the name containing special character.
Thanks in advance.
Replace the single quote(‘) in the String as shown. Please try this.