Aghh! I might give it a try on one of our 2008 servers and see if the same problem.
I've solved the issue by using a normal SQLDataReader and getting a string, but would have been nice and clean to return an XMLReader object to the receiver On Nov 26, 4:15 pm, Stephen Russell <[email protected]> wrote: > On Thu, Nov 25, 2010 at 8:36 AM, hanks2000 <[email protected]> > wrote: > > Hi Guys > > > I'm fetching data using an SQL stored procedure and returning XML > > using FOR XML EXPLICIT. > > > In my code I'm then using ExecuteXMLReader on my sql command to pull > > the data into an XMLReader. > > > When I try parsing the XMLReader, loading into an XMLDocument etc I > > get the following exception when the contents of some elements are > > rather long (approx 700 chars inc spaces) > > > System.Xml.XmlException: Unexpected end of file has occurred. The > > following elements are not closed: > > > If I reduce the contents of the XML elements drastically everthing > > works fine. > > > Is there a known limit on Element contents when using XMLReader that > > makes it think the element tags havent been closed? > > ---------------- > > I don't think that the ROW is complete when XML output from SQL Server > if you get a huge text block. This was an issue we found in 2000 > version. > > -- > Stephen Russell > > Sr. Production Systems Programmer > CIMSgts > > 901.246-0159 cell- Hide quoted text - > > - Show quoted text -
