When I am creating a data in the XML document type in SQL. At the time of executing the
sp_xml_preparedocument i am getting the error "Must declare the scalar variable @doc"
My code is a follows:
DECLARE @DOC int
DECLARE @XMLDOC nvarchar(1000)
SET @XMLDOC = N'
OrderDate="2006-07-04T00:00:00">
OrderDate="2006-08-16T00:00:00">
'
At the time of creating an internal representation of the xml document by
"exec sp_xml_preparedocument @doc output, @xmldoc
i am getting the error message:- Must declare the scalar variable "@doc"
please let me know what is to be done.