ole/db provider 'openxml' irowset::restartposition returned 0x80004005

Error in SQL SERVER 200 :-ole db provider 'openxml' reported an error. the provider did not give any information about the error. ole db error trace [ole/db provider 'openxml' irowset::restartposition returned 0x80004005

This exception generates when you are using openxml and select record directly from xml input file or text .It comes only on SQL SERVER 2000 but not on SQL SERVER 2005.

for resolving such issue you have to first create a temp table in sql server with open xml and select record directly from there temp table instead of selecting direclty from openxml.
like this

Correct :- if(exists(select tblHHA160_HEADER.FED_ID from tblHHA160_HEADER inner join #TempDataHeader on tblHHA160_HEADER.FED_ID=#TempDataHeader.FED_ID))


InCorrect :---if(exists(SELECT FED_ID FROM OPENXML (@idoc, '/ROOT/tblHeader',1) WITH (FED_ID varchar(6)) where FED_ID in (Select FED_ID from tblHHA160_HEADER)))

Comments

Popular posts from this blog

OutSystems – A Low-code Development Platform

What is difference between Azure Cognitive Search and Elastic Search

failed to access iis metabase asp.net