Skip to content Skip to sidebar Skip to footer

Android Development With Sqlite: Query Result Shouldn't Be Empty

I have a rather big query that is returning data when executed outside android while returning nothing when executed within android. I split the query in several pieces and determ

Solution 1:

In the Android database API, all query parameters are strings. (This is a horrible design mistake.)

Your query corresponds to:

...AND sp.route='1'

Try to convert the parameter strings back into a number like this:

... AND sp.route = CAST(? ASINT)

or just put the number directly into the query string.

Post a Comment for "Android Development With Sqlite: Query Result Shouldn't Be Empty"