I had a similar problem, and I solved it by specifying my column aliases in my rather complex query, then I used these aliases as links, for example: Beginning of my query:
SELECT lith.drill_id, lith.depth_from, ... ...
cursor.getColumnIndex("depth_from") gave -1
Then I added the column aliases:
SELECT lith.drill_id AS drill_id, lith.depth_from as depth_from, ... ...
cursor.getColumnIndex("depth_from") then gave the correct value.
laurie_v
source share