Invalid data type error

  • I have installed SQL SERVER 2008 express edition in my machine. We are in the process of migrating our 2005 DB to 2008 because of the need of using spatial data.

    I am new to spatial data and wanted to try few basic things before using the features full fledged.

    So after installing the express edition, I opened the editor and tried this query.

    Declare @myGeometryVariable as Geometry

    Declare @myGeographyVariable as Goegraphy

    When i execute these lines, I get the data type not found error.

    Msg 2715, Level 16, State 3, Line 2

    Column, parameter, or variable #1: Cannot find data type GEOMETRY.

    Parameter or variable '@myGeometryVariable' has an invalid data type.

    Msg 2715, Level 16, State 3, Line 2

    Column, parameter, or variable #2: Cannot find data type GEOGRAPHY.

    Parameter or variable '@myGeographyVariable' has an invalid data type.

    Also can you please provide me some links where i can learn about how to create tables with the new data types, the format in which the data to be stored in the Geometry and Geography fields and also basic queries to get the result set.

    Thanks In Advance

    krishna

  • Have a look at these:

    http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx

    and

    http://blogs.technet.com/andrew/archive/2007/11/26/sql-server-2008-spatial-data-types.aspx

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Hi,

    Thank you for the links. Can i get some more links where we have TSQL examples of creating tables with spatial data types, data insertion and data manipulation queries.

    Also any idea of why i am getting the Invalid DAta Type Error in the SQL SERVER 2008 Express Edition.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply