[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Problem with BULK import XML file : accents bug

Asked by javilmer in SQL Server 2005

Hello,
We use a bulk import of an XML file to SQL SERVER 2005 :

DECLARE @xmlFileName VARCHAR(300)
SELECT  @xmlFileName = 'C:\myfile.xml'
EXEC('
INSERT INTO _XmlImportTest(xmlFileName, xml_data)
SELECT ''' + @xmlFileName + ''', xmlData
FROM
(
    SELECT  *
    FROM    OPENROWSET (BULK ''' + @xmlFileName + ''' , SINGLE_BLOB) AS XMLDATA
) AS FileImport (XMLDATA)
')

It works well except when we have accents (in the data, not in the tag name of course) the imports stops with the following error :

Analyse XML : ligne 4, caractère 20, caractère XML non conforme

which disappear as soon as we take out the accentuated character.

So the question is how can we bulk import an XML file with accent datas ?
[+][-]10/21/09 08:42 AM, ID: 25625111Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/22/09 10:55 AM, ID: 25883000Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625