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);
Any ideas why I am getting bind or column index out of range on this query?
The error bind or column index out of range was due to the fact that I was not including Primary key field (UserDictionary.Words._ID) in the projection field.