[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 A .NET Framework error occurred



Analysis Services
CLR Integration
High Availability
Open Source
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016

A .NET Framework error occurred during execution of user defined routine or aggregate 'geometry'.

Applies to: Microsoft SQL Server 2008 (Katmai) November CTP (CTP 5).

Error Message.

(local)(domainname\amorillo): Msg 6522, Level 16, State 1, Line 3
A .NET Framework error occurred during execution of user defined routine or aggregate 'geometry':
System.FormatException: 24141: A number is expected at position 41 of the input. The input has o.
at Microsoft.SqlServer.Types.OpenGisWktReader.RecognizeDouble()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePoint()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParseLineStringText(FigureAttributes attributes)
at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonText()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonTaggedText()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParseGeometryTaggedText()
at Microsoft.SqlServer.Types.OpenGisWktReader.ReadGeometry()
at Microsoft.SqlServer.Types.SqlGeometry.STGeomFromText(SqlChars geometryTaggedText, Int32 srid)




You get this error message in Microsoft SQL Server 2008, when you execute a SELECT statement and that statement processes invalid geometry objects, as in the example below:

SET @shape = geometry::STGeomFromText(
'POLYGON ((0 0, 150 0, 150 150, 0 150, o 0))',0)
SELECT @shape.ToString()

As you can see in the image, when defining the polygon's points we typed and "o" instead of zero.



Review your geometry objects and correct where needed.



.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.