I\'m developing an expense tracker where I want to populate the DB with a few records when the application first start. I tried to call the method in my splash activity and add
android.database.sqlite.SQLiteException: no such column: exp_type (code 1): , while compiling: SELECT * FROM expense_type Order BY exp_type DESC
This is your error:
String CREATE_EXPENSE_TYPE_TABLE = "CREATE TABLE " + TABLE_EXPENSE_TYPE
+ " (" + KEY_EXPENSE_ID + " INTEGER AUTOINCREMENT" +
KEY_EXPENSE_TYPE + " TEXT PRIMARY KEY" + ")
You need a space after INTEGER AUTOINCREMENT
KEY_EXPENSE_ID + " INTEGER AUTOINCREMENT" +
KEY_EXPENSE_TYPE
evaluates to:
"id integer autoincrementexp_type"