Reputation: 35
can someone tell me what is wrong with this code?
i am getting an error saying that the table does not have any column named description:
public static final String DATABASE_CREATE = (
"CREATE TABLE " + TABLE_NAME + "(" +
COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"+
COLUMN_TITLE + " text not null," +
COLUMN_CATEGORY + " text not null," +
COLUMN_DESCRIPTION + " text not null," +
COLUMN_IMAGE + " text not null);");
Upvotes: -1
Views: 49
Reputation:
Erase your app's data. Adding the new column will not add it to the database intermediately. Clear your app data from app settings and when you run the app again, your database will be recreated with the new column included.
Upvotes: 1