I’m creating a new SQLite database in Android via this method:
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE events (_id INTEGER PRIMARY KEY AUTOINCREMENT, chosenSpot TEXT, chosenTime TEXT, chosenDate TEXT, chosenGroup TEXT);");
}
In short, it has 5 columns, one for the Id, the rest for a chosen{Spot/Time/Date/Group}
To get the spot given a Cursor c, i succeed with c.getString(1).
But this fails for c.getString(2..4) and i don’t know how to further debug this, how to check my db size, etc. I checked the column count with c.getColumnCount() and it returns 2 when it should be 5!
What’s up with that?
=edit=
my log cat:

You should be using cursor.getColumnIndex(“_id”) to get column ID’s.
cursor.getString( cursor.getColumnIndex("_id") );