Hashey100
Hashey100

Reputation: 984

SQLite returned error code 1 = no column

I was trying to insert new data int my database called KEY_DAY but when it displays an err

Upvotes: 0

Views: 974

Answers (1)

Snicolas
Snicolas

Reputation: 38168

You forgot to add the column in your create table statement :

 db.execSQL("CREATE TABLE " + DATABASE_TABLE + " (" +
        KEY_ROWID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
        KEY_NAME + " TEXT NOT NULL, " +
        KEY_DAY + " TEXT NOT NULL, " +
        KEY_HOTNESS + " TEXT NOT NULL);"
        );

Upvotes: 2

Related Questions