There is a thing that I can not understand about Cursor.getType(), can anyone explain why do I get this stupid exception when I want to get columns type if cursor has no record but there are columns? I mean, if cursor has record there is no problem, I can use getType method to get columns type without any problem but if there is no any record it throws this exception out.
The question is why must I need records to get columns type? Why just knowing columns name is not enough to get types of it? Is this ridiculous?
It’s because SQLite uses dynamic typing:
http://www.sqlite.org/datatype3.html
So no value, no data type.