Skip to content Skip to sidebar Skip to footer

What Is Wrong With My Query

I am trying to query the database using CursorLoader this is the query that comes out from the loader 11-24 17:33:21.507: E/ACRA(32418): Caused by: android.database.sqlite.SQLit

Solution 1:

Your LIKE pattern does not use correct SQL syntax.

The % must be inside a string (i.e., inside quotes), but the ? must be outside, so you have to concatenate them:

...AND data1 LIKE ? || '%')) ORDER BY ...

Post a Comment for "What Is Wrong With My Query"