forum

Home / DeveloperSection / Forums / SQLiteException: no such column

SQLiteException: no such column

Allen Scott 3332 17-Nov-2014

I have the below method that when executed gives the error:

11-09 12:11:17.578: E/AndroidRuntime(21018): Caused by: android.database.sqlite.SQLiteException: no such column: happy (code 1): , while compiling: select * from Bank where english = happy

The method is:

public boolean BankHas(Word currentWord) {
        openDataBase();
        Cursor cursor = myDataBase.rawQuery("select * from Bank where english = " + currentWord.english, null);
        return cursor.moveToFirst();
    }

My table scheme:

CREATE TABLE `Bank` (
    `english`   TEXT
);


Updated on 17-Nov-2014

Can you answer this question?


Answer

1 Answers

Liked By