I'm using a tutorial here to provide an AutoCompleteTextView with a SimpleCursorAdapter. It works perfectly as is, but I've changed the database to use fts3 because I've heard it's faster (hence, the name).
It seems something in the code is hard-wired to use the column _id
because after changing to an fts3 table, I get this error:
01-28 21:31:53.018: E/AndroidRuntime(16284): java.lang.IllegalArgumentException: column '_id' does not exist
01-28 21:31:53.018: E/AndroidRuntime(16284): at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:314)
Even though I haven't declared the autoincrement key anywhere (as it's superceded by rowid
in fts3). The error occurs in AbstractCursor
, so there's not much I can do about it.
I'm thinking there might be a way to force the code to recognize rowid
as _id
by using SELECT rowid,* FROM mytable
and then changing the column name somehow.. I'm pretty new to sql so any help is appreciated!