The following two SQL statements work fine most of the time. Lately I get an error in a specific case:
Msg 9420, Level 16, State 1, Procedure Alcom_Get_Customer_Details, Line 96 XML parsing: line 1, character 399, illegal xml character
The error generating statements are
Exec @ErrCode=sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
SELECT @XmlResponse as XmlResponse
select @XmlResponse = CAST(@ResponseText as xml)
When I examine the output of 'SELECT @XmlResponse as XmlResponse's statement it is only is only 361 characters. It looks like there are extraneous characters from 362 onwards.
How do I fix the error please?
Thank you.
@ResponseText
? Does it actually contain illegal XML character? – har07