Note that there are some explanatory texts on larger screens.

plurals
  1. POIllegalArgumentException: column '_id' does not exist when call to SimpleCursorAdaptor
    primarykey
    data
    text
    <p>I have a table named "master" with columns <code>id</code>, <code>name</code>, <code>surname</code>, <code>gender</code>, and <code>designation</code></p> <p>When I fire off a query to get a <a href="http://developer.android.com/reference/android/database/Cursor.html" rel="noreferrer">Cursor</a> object for a <a href="http://developer.android.com/reference/android/widget/CursorAdapter.html" rel="noreferrer">CursorAdapter</a> I get:</p> <pre><code>IllegalArgumentException: column '_id' does not exist when call to CursorAdaptor </code></pre> <p>But I don't have a columen named "_id".</p> <p>Can anybody tell me why I am getting this error?</p> <p>Here is the stack trace:</p> <pre><code>07-13 15:45:40.582: WARN/System.err(295): java.lang.IllegalArgumentException: column '_id' does not exist 07-13 15:45:40.592: WARN/System.err(295): at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:314) 07-13 15:45:40.592: WARN/System.err(295): at android.widget.CursorAdapter.changeCursor(CursorAdapter.java:257) 07-13 15:45:40.602: WARN/System.err(295): at com.praumtech.names4baby.ui.NamesListAdapter.setCursor(NamesListAdapter.java:63) 07-13 15:45:40.602: WARN/System.err(295): at com.praumtech.names4baby.ui.BoysNamesListActivity.initNameList(BoysNamesListActivity.java:79) 07-13 15:45:40.602: WARN/System.err(295): at com.praumtech.names4baby.ui.BoysNamesListActivity.onCreate(BoysNamesListActivity.java:49) 07-13 15:45:40.602: WARN/System.err(295): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) 07-13 15:45:40.602: WARN/System.err(295): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364) 07-13 15:45:40.612: WARN/System.err(295): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 07-13 15:45:40.612: WARN/System.err(295): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 07-13 15:45:40.612: WARN/System.err(295): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 07-13 15:45:40.612: WARN/System.err(295): at android.os.Handler.dispatchMessage(Handler.java:99) 07-13 15:45:40.621: WARN/System.err(295): at android.os.Looper.loop(Looper.java:123) 07-13 15:45:40.621: WARN/System.err(295): at android.app.ActivityThread.main(ActivityThread.java:4203) 07-13 15:45:40.621: WARN/System.err(295): at java.lang.reflect.Method.invokeNative(Native Method) 07-13 15:45:40.621: WARN/System.err(295): at java.lang.reflect.Method.invoke(Method.java:521) 07-13 15:45:40.621: WARN/System.err(295): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 07-13 15:45:40.621: WARN/System.err(295): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 07-13 15:45:40.631: WARN/System.err(295): at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload