title: Getting data from the sqlite db into c# string
body: <p>I have this code</p>
  
  <pre><code>string[] GetFaculties()
      {
          string[] result = { };
          SetConnection();
          sql_con.Open();
          sql_cmd = sql_con.CreateCommand();
          sql_cmd.CommandText = "SELECT kyrname FROM tnames";
          SQLiteDataReader reader = sql_cmd.ExecuteReader();
          int i = 0;
          foreach (DbDataRecord record in reader)
          {
              result[i] = record["kyrname"].ToString();
              i++;
          }
          sql_con.Close();            
          return result;
      }
  </code></pre>
  
  <p>which returns me "No current row" exception for 'foreach'. How do I fix it?</p>