I'm not sure why I'm not receiving a count from the following code. It seems pretty straight forward, and yes, there is an id of '24' in this table and field. I think the problem resides somehow with the query and I may not be seeing it.
My Problem:
The
Java code with the SQLite query will not return a count.
What I've done:
I've copied the concatenated 'countIDs'
string value from the variable (i.e. statement below) and executed it manually against SQLite and it returns the correct count.
I've tried passing the statement directly within the "sConn.preparedStatemement(...), bypassing the string variable and it still doesn't return the correct result.
I've double checked the documentation for SQLite COUNT() function queries. (
http://www.sqlitetutorial.net/sqlite-count-function/)
I've messed with using and eliminating the 'while' statement and tried different result set functions.
This is the actual Java concatenated string:
SELECT COUNT(*) FROM Notes WHERE SourceID = 24