I found something weired in my application. I created a table with a column named type
which should store integers:
db.execSQL("CREATE TABLE " + CellColumns.TABLE + " ("
+ CellColumns._ID + " INTEGER PRIMARY KEY,"
+ CellColumns.TYPE + " INTEGER," // <-- this
+ CellColumns.CELL_ID + " INTEGER,"
+ CellColumns.CITY_ID + " INTEGER,"
+ CellColumns.LOAD + " INTEGER,"
+ CellColumns.ORIENTATION + " INTEGER);");
Reading:
String type = c.getString(c.getColumnIndex(CellColumns.TYPE));
But somehow I always store strings into it without any problems (seems I forgot that this column was meant for integers). Also reading the strings with a query works. Is this dynamic "type cast" of a column a feature of sqlite?