Re: How to use content of file for xml input?
- From: "Michael Rys [MSFT]" <mrys@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 2 Jan 2007 09:24:51 -0800
You write a stored procedure with an ntext typed parameter and you read the
XML on the client and pass it to the stored procedure as a parameter. You
will have to change encoding to UTF-16 on the midtier before you pass it in
though.
Best regards
Michael
"Oliver" <oliver.muenchow@xxxxxx> wrote in message
news:1167740889.192836.302290@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Everyone,
actually i'm starting to work with OpenXML on SQL Server 2k. At the
examples i found everywhere a variable was defined and filled
hardcode. Something like this:
DECLARE @idoc int
DECLARE @doc varchar(1000)
SET @doc = 'This is the content of my file'
EXEC sp_xml_prepraredocument @idoc OUTPUT, @doc
But i don't have any hardcoded text. I have a lot of xml files, which
liked to be prepared. They size vary from 1 MB to 100 MB and i don't
know how to pass them into the stored procedure.
So can anyone tell me, how a external xml file can be prepared to use
it with sp_xml_preparedocument?? What functions are needed to read the
content of a given file and access it for a stored procedure??
Best regards,
Oliver
.
- Follow-Ups:
- Re: How to use content of file for xml input?
- From: Oliver
- Re: How to use content of file for xml input?
- References:
- How to use content of file for xml input?
- From: Oliver
- How to use content of file for xml input?
- Prev by Date: new to xQuery -- problem
- Next by Date: Re: new to xQuery -- problem
- Previous by thread: How to use content of file for xml input?
- Next by thread: Re: How to use content of file for xml input?
- Index(es):
Relevant Pages
|