Skip to content Skip to sidebar Skip to footer

Android Java Sqlite Queries And Single Quotes

When attempting to query text fields in SQLite I get force closes if the text field contains a single quote character. I know why it's happening but how can I fix it?

Solution 1:

Use the ? operator. Your query will be like FIELD=?, and the next argument to the query() call will be a String array where you provide an argument for each ? you used.


Post a Comment for "Android Java Sqlite Queries And Single Quotes"