title: RFC_READ_TABLE concatenates columns in row results
body: <p>The following query concatenates the columns results for each row.  I need to seperate columns with either some kind of delimiter or unique row[i] results.</p>
  
  <p>Query<br /></p>
  
  <pre><code>"exec rfc_read_table @query_table='VBAK', @rowcount=50, @FIELDS= '&lt;FIELDS&gt;&lt;RFC_DB_FLD xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;FIELDNAME&gt;MANDT&lt;/FIELDNAME&gt;&lt;/RFC_DB_FLD&gt;&lt;RFC_DB_FLD xmlns="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/"&gt;&lt;FIELDNAME&gt;VBELN&lt;/FIELDNAME&gt;&lt;/RFC_DB_FLD&gt;&lt;/FIELDS&gt;,@fields=@flds output'"
  </code></pre>
  
  <p>.NET</p>
  
  <pre><code>          using (SAPCommand cmd = conn.CreateCommand())
              {                        
                  cmd.CommandText = //See query above
  
  
                  SAPDataReader rdr = cmd.ExecuteReader();
  
                  while (rdr.Read())
                  {
                      Console.Write(" {0} ", rdr[0]);
                      //Console.Write(" {0} ", rdr[1]);//null...
                      Console.WriteLine();
                  }
  </code></pre>
  
  <p><strong>UPDATE</strong><br />
  I am able to separate the columns by following the indexes returned by <br />
  <code>DataTable dtFields = (DataTable)cmd.Parameters["@flds"].Value;</code> (updated query)</p>
  
  <p>The process is so klunky and tosses up exceptions because the indexes become unreliable when the last columns in the query return empty results (also found a length indicator that was wrong).  I worked around most of it, but this is so bad.  Is there a better supported method to query SAP with .NET?</p>