Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot initialize the Geography field
Message
From
21/03/2012 09:08:31
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Cannot initialize the Geography field
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01538885
Message ID:
01538885
Views:
93
I have a Geography field created in a table. By default, it has NULL values. I can see it when I do a SQL select query.

From SSMS, I did refresh the database. However, intellisense cannot allow me to see the field at SET clause:
UPDATE Client SET Geography=geography::STGeomFromText(GeographyTemporary,4326)
So, I tried this:
UPDATE Client SET Client.Geography=geography::STGeomFromText(GeographyTemporary,4326)
And, after Client. the Geography field does not come up.

I arrived at this situation because the original line gives this error:

Msg 6522, Level 16, State 1, Line 1
A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":
System.FormatException: 24114: The label in the input well-known text (WKT) is not valid. Valid labels are POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, or GEOMETRYCOLLECTION.
System.FormatException:
at Microsoft.SqlServer.Types.OpenGisWktReader.ParseTaggedText(OpenGisType type)
at Microsoft.SqlServer.Types.OpenGisWktReader.Read(OpenGisType type, Int32 srid)
at Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, SqlChars taggedText, Int32 srid)
.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform