locked
Web site no longer run with Spatial Data Type RRS feed

  • Question

  • With SQL Server 2012, the Web site was running ok with tables containing Spatial Data Type.

    The only think I did was to install the following two files on the Web server:

    Microsoft System CLR Types for Microsoft SQL Server System
    Microsoft SQL Server Shared Management Objects

    ...and, adding this to the connection string: ;Type System Version=SQL Server 2012

    Now, the Web site is running against SQL Server 2014. Then, of course, it no longer runs. We have this:

    "DataReader.GetFieldType(371) returned null."

    So, I upgraded the project to use the new 2014 version of the above two files. I had to remove that setting in the connection string as this is no longer supported.

    But, the Web site does not want to run. This is the same error.

    Some says to add a reference to Microsoft.SqlServer.Types.dll in the project and deploy that to the Web site bin directory. I did that with no success.

    Some says to lower down the application pool to 32 bits. I did that with no success.

    Is this still working in 2014?
    Thursday, June 16, 2016 3:08 PM

Answers

  • Things are still supported. Did you get this repaired?

    It sounds like you installed a different version of Microsoft System CLR Types on the (web) client than you have on the SQL server. Here's a couple of things to try.

    Make sure that you install the spatial data types from the appropriate SQL Server feature pack, not by copying files. IIRC this installs three files, two of them in the windows/system32 directory. Look for SqlServerSpatial.dll or SqlServerSpatialNNN.dll (where NNN is a number like 120 or 130) in windows/system32, and microsoft.sqlserver.types.dll in a subdirectory of the directory where SQL Server is installed or in the global assembly cache. The feature pack install program installs all the DLLs in the correct place. Check the four-part version number (right-click on the DLL file, choose properties and look in the Version tab) and make sure client and server version match.

    You may need to post the question about website deployment on the ASP.NET forums http://forums.asp.net/

     

    • Proposed as answer by Charlie Liao Thursday, June 30, 2016 2:13 AM
    • Marked as answer by Charlie Liao Thursday, June 30, 2016 2:58 PM
    Thursday, June 23, 2016 11:18 PM

All replies

  • 

    Spatial Data is still supported in SQL Server 2014. Spatial data represents information about the physical location and shape of geometric objects. These objects can be point locations or more complex objects such as countries, roads, or lakes.

    https://msdn.microsoft.com/en-in/library/bb933790(v=sql.120).aspx

    Friday, June 17, 2016 10:40 AM
  • This is completely not related to the question.

    Monday, June 20, 2016 6:24 PM
  • Things are still supported. Did you get this repaired?

    It sounds like you installed a different version of Microsoft System CLR Types on the (web) client than you have on the SQL server. Here's a couple of things to try.

    Make sure that you install the spatial data types from the appropriate SQL Server feature pack, not by copying files. IIRC this installs three files, two of them in the windows/system32 directory. Look for SqlServerSpatial.dll or SqlServerSpatialNNN.dll (where NNN is a number like 120 or 130) in windows/system32, and microsoft.sqlserver.types.dll in a subdirectory of the directory where SQL Server is installed or in the global assembly cache. The feature pack install program installs all the DLLs in the correct place. Check the four-part version number (right-click on the DLL file, choose properties and look in the Version tab) and make sure client and server version match.

    You may need to post the question about website deployment on the ASP.NET forums http://forums.asp.net/

     

    • Proposed as answer by Charlie Liao Thursday, June 30, 2016 2:13 AM
    • Marked as answer by Charlie Liao Thursday, June 30, 2016 2:58 PM
    Thursday, June 23, 2016 11:18 PM