Cursor returns a count of -1, but items are present?
<p>I am using an SQLite database to store and retreive my app data, and what to check for duplicate entries. I attempt to retrieve all entries where the titles match, as such:</p>

<pre><code>Cursor c = mDb.query(DatabaseHelper.GOALS_TABLE_NAME, 
                     new String[] { Goals.GOAL_ID, Goals.TITLE }, 
                     Goals.TITLE + "='" + title + "'", null, null, null, 
                     null, null);
</code></pre>

<p>where title is the one to compare against. </p>

<p>This query runs, but the cursor gives a count of -1. A call without the where clause also returns -1, but I know data is present, as I am able to bind a list view to it.</p>

<p>Is there something I am missing, do I have to populate the cursor somehow?</p>

<p>Thanks in advance, </p>

<p>Venatu</p>
