-1

I have a sqlite file

CREATE TABLE `mall` (
    `id`    INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    `name`  TEXT NOT NULL,
    `kordinat`  TEXT NOT NULL
);

this is select code

cursor = db.rawQuery("SELECT name FROM mall", null);
cursor.moveToFirst();

when I run those code, It work, but when I change "name" field to "kordinat" field, it error and says "no such column: kordinat". please help

muasx
  • 29
  • 9

1 Answers1

0

no such column: kordinat

This is because at first time mall table is created with column name and when you are changing it to kordinat, you are trying to create the table with same name but different schema, so this is not creating the table because table with that name already exists with previous schema.

Uninstall the application and Re-Install the application to you Debugging device.

Ghulam Moinul Quadir
  • 1,638
  • 1
  • 12
  • 17