Daily Archives: September 11, 2011

Can’t Cast from SqlGeometry to SqlGeometry and Other Strange Version Conflicts with SQL Server Denali Microsoft.SqlServer.Types

I came across a curious error earlier today when attempting to use a SqlDataReader to read a column of geometry data from a SQL Server table: System.InvalidCastException: Unable to cast object of type ‘Microsoft.SqlServer.Types.SqlGeometry’ to type ‘Microsoft.SqlServer.Types.SqlGeometry’ SqlGeometry to SqlGeometry… … Continue reading

Posted in Spatial, SQL Server | Tagged , | 1 Comment