Cannot find data type xml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Justin

    Cannot find data type xml


    I am getting this error when running on my local instance of SQL
    server, but it is not an issue when running on our development SQL
    Server box.

    Code:
    --variable declarations
    declare @XmlDocument xml --2GB limit
    declare @docHandle int

    Msg 2715, Level 16, State 3, Line 14
    Column or parameter #-1: Cannot find data type xml.
    Parameter '@XmlDocument' has an invalid data type.
  • Plamen Ratchev

    #2
    Re: Cannot find data type xml

    The XML data type was added in SQL Server 2005. You need to make sure
    your local instance is SQL Server 2005/2008. If the database was
    upgraded, then you can check the compatibility level (under Database
    properties, Options) and make sure it is set to SQL Server 2005 (90) or
    SQL Server 2008 (100).

    --
    Plamen Ratchev

    Comment

    • Justin

      #3
      Re: Cannot find data type xml


      Thank you. I mistakenly connected to a SQL 2000 instance.

      On Sep 8, 11:33 am, Plamen Ratchev <Pla...@SQLStud io.comwrote:
      The XML data type was added in SQL Server 2005. You need to make sure
      your local instance is SQL Server 2005/2008. If the database was
      upgraded, then you can check the compatibility level (under Database
      properties, Options) and make sure it is set to SQL Server 2005 (90) or
      SQL Server 2008 (100).
      >
      --
      Plamen Ratchevhttp://www.SQLStudio.c om

      Comment

      Working...