title: DataTable.Load(FbDataReader) does not load everything into DataTable
body: <p>There is a closely related question here: <a href="https://stackoverflow.com/questions/229425/net-datatable-skips-rows-on-loaddatareader">.NET DataTable skips rows on Load(DataReader)</a></p>
  
  <p>I have a SQL Query that returns 169 results. The result looks like this:</p>
  
  <pre><code>CustomerID Customer Name TerminalID Creation Date
       1     First Customer   12345   2010-07-07
       1     First Customer   12346   2010-07-07
       1     First Customer   12347   2010-07-07
       2     Second Customer  23456   2011-04-18
  </code></pre>
  
  <p>This result is correct.</p>
  
  <p>I entered the query in a C# program and execute it like this:</p>
  
  <pre><code>public DataTable getDataTableFromSql(FbCommand command)
  {
      // Create a new datatable
      DataTable result = new DataTable();
  
      // Set up the connection
      using (FbConnection con = new FbConnection(this.connectionString))
      {
          // Open the connection
          con.Open();
  
          // Set up the select command
          FbCommand sqlCmd = command;
          // Add the connection to it
          sqlCmd.Connection = con;
  
          try
          {
              // Get the results
              using (FbDataReader sqlReader = sqlCmd.ExecuteReader())
              {
                  // Load the results into the table
                  result.Load(sqlReader);
              }
          }
          catch (Exception ex)
          {
              Console.WriteLine(ex);
          }
      }
  
      // Return the table
      return result;
  }
  </code></pre>
  
  <p>This code is tested and it works fine for many different SQL queries.
  But for the above query the <code>DataTable</code> only contains 39 results and looks like this:</p>
  
  <pre><code>CustomerID Customer Name TerminalID Creation Date
       1     First Customer   12347   2010-07-07
       2     Second Customer  23456   2011-04-18
  </code></pre>
  
  <p>I fiddled around with the code a bit and here's what I found out so far: The <code>FbDataReader</code> correctly fetches the results from the database. If I just query for the <code>TerminalID</code> I end up with 169 results in the <code>DataTable</code>. If I query for the <code>CustomerID</code> I recieve 39 results.</p>
  
  <p><strong>Conclusion:</strong> The line <code>result.Load(sqlReader)</code> groups the result for <code>CustomerID</code> and throws away all other results, no matter if they can be grouped or not.</p>
  
  <p>Why is this happening? How can I load the result of my query into the <code>DataTable</code> without "losing" any rows due to unlogical grouping? And why does the <code>DataTable</code> "group" the result in the first place?</p>
  
  <p>Note: I also tried all three <code>LoadOptions</code> available for <code>DataTables</code>, all with the same outcome: Only 39 results are loaded into the <code>DataTable</code>.</p>