简体   繁体   中英

Error occured usind sp_xml_removedocument

I have a stored procedure. IN that stored procedure there is " SP_XML_PREPAREDOCUMENT and SP_XML_REMOVEDOCUMENT" .In that stored procedure iam passing two parameters one is in form of xml and another one in employeeId. while I Just edited xml creation function because i added two columns to the table. then i execute stored procedure for inserting values i got error like this.I dont understand. I dont never used SP_XML_PREPAREDOCUMENT and SP_XML_REMOVEDOCUMENT.Please Help me

The error description is 'Duplicate attribute.'.Could not find prepared statement with handle 0.sp_xml_removedocument:The value supplied for parameter number 1 is invalid.The statement has been terminated.

I guess you are getting this error because the handle has not been initialized when you are calling sp_xml_removedocument. You may try a check like below to avoid the error:

IF @iData IS NOT NULL
    EXEC sp_xml_removedocument @iData

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM