I have a an SQLite query I'm attempting to run however it is force closing due to an apostrophe in my title string. I've attempted to resolve this by using title.replace("'", "''")
and title.replace("'", "\\")
as well as title.replaceAll("'", "\"); however it is still force closing due to the apostrophe - and when I debug - the apostrophe still exists in title - can anyone point on what I may have done wrong here?
Source Snippet:
String title = info.get(MeetingInfo.MEETING_TITLE);
String selectionClause = Events.DTSTART + " = '" + startTime + "' AND "
+ Events.DTEND + " = '" + endTime + "' AND "
+ Events.TITLE + " = '" + title.replace("'", "\\") + "'";