February 9, 2004 at 5:24 am
This code fails with an XML Parse error because of the French character, can anyone tell me how to make it work? Thanks.
DECLARE @idoc int
EXEC sp_xml_preparedocument @idoc OUTPUT, '<Name>Labbé</Name>'
SELECT Name FROM OPENXML (@idoc, '/Name') WITH (Name char(10) '.')
EXEC sp_xml_removedocument @idoc
February 9, 2004 at 9:52 am
This is a little out of my area, but I think you need to handle the double-byte character in a nchar field rather than plain old, char.
February 9, 2004 at 10:22 am
Yep, nvarchar does it. Thanks
February 10, 2004 at 7:49 am
I was too quick there. Using nvarchar fixed the first problem, but now I have halved the possible size of my parameter. My xml in some cases is larger than 4,000 bytes and the proc fails with xml parser error, presumably cos the xml is being truncated.
Is it possible to pass text parameters to a proc? Or would I need to use some other method, like using ADO on the client to insert the xml into a table using text functions?
February 10, 2004 at 8:08 am
Answered my own questions after a bit of rtfm (sorry for being so lazy). Didn't know a SP could have ntext as a parameter!!
February 10, 2004 at 10:13 am
If you use <!CDATA> for any data it should work.
Leah Kats
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply