title: .NET and TSQL "For Xml Auto" Splits XML Result
body: <p>I'm using some TSQL with 'For XML Auto'.  If I run the TSQL in management studio, I get a single row.  If I fill the DataTable using the DataAdapter.Fill() command, I get two results.  It appears that the results are split in the middle of one of the tags.  It is not a huge XML file, in fact its quite small (perhaps 20 lines), so size is likely not the issue.  Here's the SQL.  </p>
  
  <blockquote>
    <p>SELECT     Organization.Name,
    Organization.Abbreviation,
    Organization.WebsiteURL,
    Organization.AddressLine1,
    Organization.AddressLine2,
          Organization.City,
    Organization.Province,
    Organization.Country,
    Organization.PostalCode,
    Organization.Phone,
    Organization.Email,
          Organization.ContactFirstName,
    Organization.ContactLastName  FROM<br>
    StudentLife.MissionWeekOrganization
    Organization INNER JOIN
                          StudentLife.MissionWeekOrganizationAttendee
    reg ON
    Organization.MissionWeekOrganizationId
    = reg.MissionWeekOrganizationId WHERE     (reg.AttendingYear = 2010 AND
    ReceivedDate IS NOT NULL)  ORDER BY
    Organization.Name FOR XML AUTO</p>
  </blockquote>
  
  <p>The results are split right in the middle of an element</p>
  
  <blockquote>
    <p>... Organization
    Name=\"Samaritan's Purse Canada\"
    Abbreviation=\"\" WebsiteURL=\"http</p>
  </blockquote>
  
  <p>then the second row in the DataTable picks up where it left off. Any ideas?</p>