title: cursor.moveToFirst() always return false
body: <p>I have searched here for a while and nothing helped me. I guess it is simple, I'm doing something stupid. So, I have this DataBaseHelper do create a table and put two values on it:</p>
  <pre><code>public class DatabaseHelper extends SQLiteOpenHelper {
      private static final String DATABASE_NAME = &quot;db&quot;;
      public static final String PROPERTY = &quot;property&quot;;
      public static final String VALUE = &quot;value&quot;;
  
      public DatabaseHelper(Context context) {
          super(context, DATABASE_NAME, null, 1);
      }
  
      @Override
      public void onCreate(SQLiteDatabase db) {
          db.execSQL(&quot;CREATE TABLE configs (property VARCHAR(15), value VARCHAR(10));&quot;);
      
          ContentValues cv=new ContentValues();
          
          cv.put(PROPERTY, &quot;registered&quot;);
          cv.put(VALUE, &quot;true&quot;);
          db.insert(&quot;configs&quot;, PROPERTY, cv);
          
          cv.put(PROPERTY, &quot;test&quot;);
          cv.put(VALUE, &quot;test&quot;);
          db.insert(&quot;configs&quot;, PROPERTY, cv);
      }
  }
  </code></pre>
  <p>and in my activity im trying:</p>
  <pre><code>@Override
  public void onCreate (Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.register);
      
      layout = (LinearLayout) findViewById(R.id.layoutRegister);
      
      db = (new DatabaseHelper(this)).getWritableDatabase();
      cursor = db.rawQuery(&quot;SELECT * FROM configs&quot;, 
              null);
      
      if (cursor.moveToFirst()) {
          debug = new TextView(this);
          debug.setText(cursor.getString(cursor.getColumnIndex(&quot;property&quot;)));
          layout.addView(debug);
      }
  }
  </code></pre>
  <p>and it never enters in the if. Moreover, when I try something like     cursor.getCount() I get a <em>android.content.res.Resource$NotFoundException: String resource ID #0x0</em></p>
  <p>I guess it is a simple mistake, but... Any help?</p>