Link to home
Start Free TrialLog in
Avatar of adrian78
adrian78

asked on

OpenXML SQL Server statement suddenly stopped working

I have a SQL Server query that extracts XML from an XML feed.  It uses openxml like so:

select top 1 updated from openxml( @idata, '//content:feed', 2 ) with ( updated varchar(31) 'content:updated' )

I have the same database on two different servers.  Same code.  It works perfectly fine on one server and it has been working perfectly fine on another... then all of a sudden it stopped working on the 19th I believe.   There are no errors... it just returns NULL instead of the XML value containing the feed update date.

Any idea why it stopped working?  Is there something that may have got stuck or disabled somehow on the problem server in sql server 2008?  I'm sure it's some type of configuration issue.  I don't really know the ins and outs of the OpenXML statement.  I know there are other alternatives but I'm just trying to get it back running before considering a major code change.  Thanks!
Avatar of Rich Weissler
Rich Weissler

Higher in the code, @idata should have been prepared with sp_xml_preparedocument. Ensure that whatever sp_xml_prepareddocument is consuming hasn't changed...
ASKER CERTIFIED SOLUTION
Avatar of adrian78
adrian78

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial