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.
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
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
The results are split right in the middle of an element
... Organization Name=\"Samaritan's Purse Canada\" Abbreviation=\"\" WebsiteURL=\"http
then the second row in the DataTable picks up where it left off. Any ideas?