Q:

IllegalArgumentException: column x is invalid

I have a Listview, populated from a sqlite database. The database is created with:
egrohDB.execSQL("CREATE TABLE IF NOT EXISTS " + EGROH_DB_TABLE_ITEMS +
        " (ident integer primary key AUTOINCREMENT, " +
                "id integer(15), " +... 
To get data from the database I use rawQueries and for inserting data I'm using InsertHelper. I added one row to the table. And now I'm getting an IllegalArgumentException, that mit id row is invalid.
06-02 17:48:24.340: E/AndroidRuntime(23200): FATAL EXCEPTION: main
06-02 17:48:24.340: E/AndroidRuntime(23200): java.lang.IllegalArgumentException: column 'id' is invalid
06-02 17:48:24.340: E/AndroidRuntime(23200):    at android.database.DatabaseUtils$InsertHelper.getColumnIndex(DatabaseUtils.java:1078)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.y5apps.DatabaseController.insertData(DatabaseController.java:273)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.y5apps.EgrohCatalogue.parseData(EgrohCatalogue.java:149)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.y5apps.EgrohCatalogue$3.onClick(EgrohCatalogue.java:319)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at android.os.Looper.loop(Looper.java:137)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at android.app.ActivityThread.main(ActivityThread.java:4424)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at java.lang.reflect.Method.invokeNative(Native Method)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at java.lang.reflect.Method.invoke(Method.java:511)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-02 17:48:24.340: E/AndroidRuntime(23200):    at dalvik.system.NativeStart.main(Native Method)

The error is hown at this line:
final int id_c = ih.getColumnIndex("id");

I have no idea what this exception means. What to do?

A:

You create column "id" and are asking for column "item_id"...  not in the code you show but somewhere....
It is in your insert.

