After running an sql query of the form:
SELECT table_name.column_name FROM table_name,table_name2,etc... WHERE condition1,condition2,etc...,
I get the following error, which does not shut down my program:
requesting column name with table name -- table_name.column_name
A google search for this error phrase led me to android.database.sqlite.SQLiteCursor line 314
A few lines above line 314 there is a comment that this code is a response to bug 903852. But I can't seem to find this bug on google.
So this is a two part question:
In my case, the problem was solved when I used
select table_name.column_name as column_name_alt WHERE ....
and later, in my CursorAdapter
, referred to it in the string array only as column_name_alt
.
Hope this helps.
So I ran into this problem while creating a Cursor
that would be passed to a SimpleCursorAdapter
. Turns out that while it's OK to prefix your 'query' columns String[], the subsequent String[] from
argument that's passed to the SimpleCursorAdapter
constructor does not need to be prefixed in order for the Adapter to map your result set correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With