Openxml error in remote SQL Server 2000

Openxml error in remote SQL Server 2000

Post by Simo » Sat, 09 Nov 2002 00:30:22



Hi, Everyone:

I have a sql script which using Openxml to retrive the
recordset from XML document.

The script ran successfully in query analyzer in my local
SQL Server 2000 instance. However when I ran it in remote
Dev SQL Server 2000 instance, it created an error message
(the script file still in my local machine):

Server: Msg 156, Level 15, State 1, Line 25
Incorrect syntax near the keyword 'WITH'.

It seems that the instance can not recognize the Openxml
statement.

Anyone know that why this error happen. Is any dll missing
in Dev database or I need to copy the script to Database
server?

Thanks!

Here is the XML document(excerpt from book: SQL Server
2000 Stored procedure programming)



-- sample XML document

'<root>
  <Equipment EquipmentID="1" Make="Toshiba" Model="Portege
7020CT">
    <Inventory InventoryID="5" StatusID="1"
EquipmentID="1"/>
    <Inventory InventoryID="12" StatusID="1"
EquipmentID="1"/>
  </Equipment>
  <Equipment EquipmentID="2" Make="Sony" Model="Trinitron
17XE"/>
  <Equipment EquipmentID="4" Make="HP" Model="LaserJet 4"/>
  <Equipment EquipmentID="5" Make="Bang &amp; Olafson"
Model="V4000">
    <Inventory InventoryID="8" StatusID="1"
EquipmentID="5"/>
  </Equipment>
  <Equipment EquipmentID="6" Make="NEC" Model="V90">
    <Inventory InventoryID="6" StatusID="2"
EquipmentID="6"/>
  </Equipment>
</root>'
--Load the XML document into memory.

-- SELECT statement using OPENXML rowset provider
SELECT    *






-- remove the XML document from memory

 
 
 

Openxml error in remote SQL Server 2000

Post by Bryant Like » Sat, 09 Nov 2002 09:03:29



[snip]

Quote:> The script ran successfully in query analyzer in my local
> SQL Server 2000 instance. However when I ran it in remote
> Dev SQL Server 2000 instance, it created an error message
> (the script file still in my local machine):

Are you sure that (1) the remote server is a SQL 2000 machine and (2) that
it is not running in compatibility mode?

--
Bryant