title: SQLite select query to string
body: <p>I'm not able to add read data from the following SQLite select query function. I have a table with 3 columns, namely driverID, driversName, driversNo.</p>
  
  <p>It's supposed to return a simple string but alas.</p>
  
  <pre><code>public String readDrivers() {
      Cursor cursor = database.query(MySQLiteHelper.PROFILE_TABLE_NAME, necessaryColumns, null, null, null, null, null);
  
      if (cursor != null){
          cursor.moveToFirst();
          Log.v("TEST", Integer.toString(cursor.getCount()));
          Log.v("TEST", cursor.getColumnName(0));
          Log.v("TEST", cursor.getColumnName(1));
          Log.v("TEST", cursor.getString(0));
          Log.v("TEST", cursor.getString(1));
      }
  
      String returnString = cursor.getString(0) + cursor.getString(1);
      return returnString;
  }
  </code></pre>
  
  <p>Below are the most recent results from LogCat. The last two logs don't show, for some strange reason.</p>
  
  <pre><code>08-04 20:27:35.271: V/TEST(25126): 1
  08-04 20:27:35.271: V/TEST(25126): driversName
  08-04 20:27:35.271: V/TEST(25126): driversNo
  </code></pre>
  
  <p>Any help will be greatly appreciated.</p>
  
  <p>The rest of the code is based on this tut <a href="http://www.vogella.com/tutorials/AndroidSQLite/article.html" rel="nofollow">http://www.vogella.com/tutorials/AndroidSQLite/article.html</a></p>