mardi 15 septembre 2015

Android SQLite Exception: no such column

i added date to my database, but the error said no such column named date, can anyone point out where is my mistake?

    private static final String UID = "id";
        private static final String NAME = "Bmi";
        private static final String _STATUS = "status";
        private static final String WEIGHT = "weight";
        private static final String DATE = "curDate";    

db.execSQL("CREATE TABLE " + TABLE_NAME + " ( " + UID + " integer primary key autoincrement," +
                            "" + NAME + " VARCHAR(50), " +
                            "" + _STATUS + " VARCHAR(255)," +
                            "" + WEIGHT + " VARCHAR(255)," +
                            "" + DATE + "TEXT);");

Aucun commentaire:

Enregistrer un commentaire