July 26, 2019 at 2:02 pm
Our application recently upgraded to SQL2016 from SQL2008. We store text data that users have entered in the application. When we export this data we write it as an XML string. We also send the data to Excel files using a simple conversion from a DataTable to Excel using a third-party tool called closed XML. We've noticed an issue. It seems that new-line and tab characters (and others) are now coming out of the DB in the format of 
In this format the XML and Excel (backed by XML) complain that these are invalid characters.
Is there a cast or conversion or collation that can fix this? Did the default collation change in 2016? Could it be the DB driver under Windows 2016 (also upgraded).
Thanks for any help
ST
July 26, 2019 at 2:48 pm
In looking at it further I think I'm barking up the wrong tree.
Thanks
July 27, 2019 at 3:31 pm
In looking at it further I think I'm barking up the wrong tree. Thanks
How so?
My suggestion was going to be to first question as to why such special characters exist in the data to begin with and, if they're actually required, to use the TYPE hint in the XML to de-entitize the special characters.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply