Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Replace invalid XML characters using SQL query

$
0
0

 

Hi,

   I am populating a dataset in .net with output from sql 2005 database. One of the columns in the table is a 'varchar(max)' type. This dataset is then converted to XML using WriteXml and written to a .xml document. But due to the presence of invalid characters, this process errors out.

Is there any way using which these invalid characters can be replaced at the database level itself when querying on the table?

The error that is produced is as follows:

'', hexadecimal value 0x1C, is an invalid character. Line 32201, position 924. 

 

Thanks,

Nisha


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>