I am using a datareader to fetch a table's record values through a stored proc. but while using datareader.getstring(2) to fetch the value of the particular column, the string returned is truncated ( rest of getstrings are returning complete values). Can anyone guide me in analyzing this?
2 Answers
The XML data row is truncated at 2,033 characters when you use the SqlDataReader object. To resolve this problem, use the ExecuteXmlReader method to read FOR XML queries. For additional information about how to use ExecuteXmlReader with SQL Server FOR XML queries https://support.microsoft.com/en-us/kb/310378 https://support.microsoft.com/en-us/kb/316701