2

I am getting the following error
Could not find method 'STIsValid' for 'Microsoft.SqlServer.Types.SqlGeography' in assembly 'Microsoft.SqlServer.Types' on the following query.

select ogr_geog from dbo.pod_1730_essential_energy
where ogr_geog.STIsValid() = 0 and ogr_geog is not null

All my other Spatial methods work. The ogr_geog column is a geography type. Does anybody know the root of this error?

  • 1
    STIsValid() was added to the Geography type with SQL Server 2012. You don't happen to be using SQL Server 2008, do you? – Peter Horsbøll Møller Aug 9 '16 at 6:31
3

STIsValid() was added to the Geography type with SQL Server 2012.

If you are using SQL Server 2008 this method only exists for the Geometry data type

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.