@Override
public void onCreate(SQLiteDatabase db) {
String CREATE_DATES_TABLE = "CREATE TABLE" + TABLE_NAME + "(" + COLUMN_DATES + "TEXT"+ ")";
db.execSQL(CREATE_DATES_TABLE);
}
what wrong with syntax ?
@Override
public void onCreate(SQLiteDatabase db) {
String CREATE_DATES_TABLE = "CREATE TABLE" + TABLE_NAME + "(" + COLUMN_DATES + "TEXT"+ ")";
db.execSQL(CREATE_DATES_TABLE);
}
what wrong with syntax ?
YOu are missing a space between the column name and column type, which in your case is TEXT. It should be:
String CREATE_DATES_TABLE = "CREATE TABLE " + TABLE_NAME + " (" + COLUMN_DATES + " TEXT)";
And you may want to use "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + "(..... to ensure you don't create the table if it exists(if that is a function you want).