Reputation: 11
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.
Upvotes: 0
Views: 2508
Reputation: 824
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
Upvotes: 1