Android : Table has no column named “variable name” MySql Database error

So basicly I found the solution. I’m still confused about how stupid it was. And clearly database work i super-sensitive material! My problem was I forgot a white-space in the last “INTEGER” value. So instead of " INTEGER" i wrote "INTEGER", and that gave me a row called "bruttoINTEGER" instead of “brutto”. So a white-space was the error. I rewrote the createTable function to this :

 public void onCreate(SQLiteDatabase db) {
   String CREATE_DAY_TABLE = "CREATE TABLE " + TABLE_DAYS + "(" 
 + KEY_ID + " INTEGER PRIMARY KEY," + KEY_DATE + " TEXT," + KEY_HOURS + " INTEGER, " 
 + KEY_UB + " INTEGER," + KEY_BRUTTO + " INTEGER" + ");"; 
 db.execSQL(CREATE_DAY_TABLE);
 }

Leave a Comment

deneme bonusu veren sitelerbahis casino