HI When i am trying to insert a record in one of the tables in my db using the following query its not working
insert into T_HTK_ZONES(ZONE_NAME,ZONE_GEOLOCATION)
values('TMH',GEOGRAPHY::STGeomFromText('POLYGON((86.17768049240112 22.799901048907312, 86.17795944213867 22.802432999994917, 86.18175745010376 22.802531903379716, 86.18210077285767 22.799584551714144, 86.17946147918701 22.79849658700764, 86.17768049240112 22.799901048907312))', 4326))
This is not working
but this is working
insert into T_HTK_ZONES(ZONE_NAME,ZONE_GEOLOCATION)
values('TMH',GEOGRAPHY::STGeomFromText('POLYGON((-122.358 47.653 , -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326))
Here is the error.
A .NET Framework error occurred during execution of user-defined routine or aggregate "geography": System.ArgumentException: 24200: The specified input does not represent a valid geography instance. System.ArgumentException: at Microsoft.SqlServer.Types.SqlGeography.ConstructGeographyFromUserInput(GeoData g, Int32 srid) at Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, SqlChars taggedText, Int32 srid) at Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(SqlChars geometryTaggedText, Int32 srid)
Can anyone pls explain