Hi there
I'm working on a legacy app and need to retrieve a large XML string returned by an SP. (It's doing a big join and then squashing into a string using FOR XML AUTO.)
I don't want to change the SP to use, say, output parameters, which is something I've seen mentioned a couple of times on the forum.
When I simply access the first cell in the first row of the return DataTable, I get a string truncated to 2033 characters (the actual returned value is 10s of thousands long). I know that if I use ADO.NET directly, I can get an XmlReader returned or use a DataReader in "sequential access" mode to get chunks of the string back and build the whole using a StringBuilder.
So, my problem is that:
- I don't want to change the SP
- I don't want to do direct data access (a la "new SqlConnection(connectionString)") because that defeats the object of abstracting things into a DAL
Is there any way I can get an XmlReader or a DataReader in sequential access mode from LLBL's generated code? Any other suggestions?
Regards
Chris Smith