locked
Microsoft.SqlServer.Types Missing RRS feed

  • Question

  • hi,

    Just install the Sql Server 2008 developer edition. I am trying to work on a spatial tutorial but I do not see the Microsoft.SqlServer.Types under the assemblies. How do I fix  this issue?

    thanks,
    Wednesday, August 26, 2009 12:56 PM

Answers

  • It sounds like you're using the 2008 version of SQL Server Management Studio, but still connecting to your 2005 instance.... (compatibility level 90 means SQL Server 2005).
    geography/geometry will only work on SQL Server 2008, so make sure you run any queries on that DB

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    • Marked as answer by Anonymous_189 Wednesday, August 26, 2009 9:13 PM
    Wednesday, August 26, 2009 9:09 PM
    Answerer

All replies

  • Are you using VS2008? The assembly should show up under the .NET tab as Microsoft.SqlServer.Types

    If not, you can locate the assembly manually - it's located in /Program Files/Microsoft SQL Server/100/SDK/Assemblies/Microsoft.SqlServer.Types.dll
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Wednesday, August 26, 2009 3:06 PM
    Answerer
  • Hi Tanoshimi,

    I found the assembly and added it into my sql server. When I try running geometry or geography functions it states sql server doesn't recognize what geography is.

    SELECT geography::STPointFromText('Point(-122.22 37.88',4326).STAsText()

    Msg 243, Level 16, State 4, Line 1
    Type geography is not a defined system type.


    I am not using VS 2008 at all.


    Are you the author to Beginning Spatial with SQL Server? I am actually trying to follow the coding in chapter  7 of the book. I was able to create the dll in VS2005 and import in to the sql server. Stuck on page 175 as sql server is throwing the above error.

    thanks,
    Wednesday, August 26, 2009 4:25 PM
  • Hi..... anonymous (?!)

    Yes, that's me - let's see if we can help you out. I think we might have two separate problems here, so before worrying about the geocoding function, let's work out why SQL Server can't find the geography type (because without that, you won't get very much further).

    What version of SQL Server do you have installed? SQL Server 2008 express? Try executing the following code and paste the results back here:
    SELECT @@VERSION;


    And is the database you're running the query in set to compatibility mode 100?
    SELECT name, compatibility_level FROM sys.databases
    


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Wednesday, August 26, 2009 4:48 PM
    Answerer
  • When I run SELECT @@VERSION; I get the below message. I install sql server 2008 developer edition.  I did not upgrade from SQL server 2005. Rather I have two instances of sql server on my machine 2008 / 2005.


    Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 3).

    The compatibility level is set to 90 on the database. 

    It seems like everything is working. When I open the SSMS it shows sql server 2008. But I double check on creating new databases and I did not see  the ability to create a database under compatibility 100 under the options tab.

    thanks,
    Wednesday, August 26, 2009 7:12 PM
  • It sounds like you're using the 2008 version of SQL Server Management Studio, but still connecting to your 2005 instance.... (compatibility level 90 means SQL Server 2005).
    geography/geometry will only work on SQL Server 2008, so make sure you run any queries on that DB

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    • Marked as answer by Anonymous_189 Wednesday, August 26, 2009 9:13 PM
    Wednesday, August 26, 2009 9:09 PM
    Answerer