android cursor indicates row count 1 but throws exception 0 rows found
<p>Have you ever had a cursor tell you that it has data but immediately throw an exception when trying to access that data? No? I have and I am at my wits end.
Blow is the code that throws an exception. Below it I will add the Log Cat output.</p>

<pre><code>protected void setValue(String qVal) {
    StringTokenizer tokenizer = new StringTokenizer(qVal,"|");
    String first = tokenizer.nextToken();
    if(first.equalsIgnoreCase("0"))
        return;
    String searchID = tokenizer.nextToken();
    String [] cols = {TempImageEntry.RawData, TempImageEntry.FileName};
    String selection = TempImageEntry.ID + "=" + searchID;
    Cursor cursor = mDatabase.getReadableDatabase().query(TempImageEntry.TABLE_NAME,cols,selection,null,null,null,null);
    boolean check = cursor.moveToFirst();
    if(!check)
    {
        cursor.close();
        Log.e(LOG_TAG,"Could not find image data!");
        return;
    }
    int temp1 = cursor.getColumnIndex(TempImageEntry.FileName);
    int count = cursor.getCount();
    Log.d(LOG_TAG,"Count:"+count);
    String FName = cursor.getString(temp1);
    byte [] rawData = cursor.getBlob(cursor.getColumnIndex(TempImageEntry.RawData));
    cursor.close();
    setImageData(rawData,FName);
    Log.d(LOG_TAG,"parsed image data");
}
</code></pre>

<p>Loggat output: </p>

<p><code>D/ImageHelper: Count:1
E/CursorWindow: Failed to read row 0, column 1 from a CursorWindow which has 0 rows, 2 columns.
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40e94ac8)
E/AndroidRuntime: FATAL EXCEPTION: main
                  java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.</code></p>

<p>I've tried a clean rebuild of the code. nothing helps.
I extracted the database from the device, opened it in SQLite browser, entered the same query being generated by android, and I got back data.
Every other cursor in the app follows this exact same logic path and they all work. 
I even took some variables out of inline into temp to see what they look like during runtime.</p>

<p>Thanks for any advice you can give</p>