0
   String[] mProjection =
   {
    // UserDictionary.Words._ID,    // Contract class constant for the _ID column name
   UserDictionary.Words.WORD,   // Contract class constant for the word column name
   UserDictionary.Words.LOCALE  // Contract class constant for the locale column name
  };

   searchvalue = (EditText) findViewById(R.id.editText);

    mSelectionClause = UserDictionary.Words.WORD + " LIKE ?";
    mSelectionArgs[0] = searchvalue.getText().toString();

   Cursor mCursor = getContentResolver().query(
   UserDictionary.Words.CONTENT_URI,  
   mProjection,                       
   mSelectionClause,                  
   mSelectionArgs,                    
   null);

任何想法为什么我在此查询中绑定或列索引超出范围?

4

1 回答 1

2

错误绑定或列索引超出范围是由于我没有在投影字段中包含主键字段 (UserDictionary.Words._ID)。

于 2012-11-05T15:04:09.017 回答