|Subject:||Geography and polygon|
|Date:||Mon, 27 Dec 2010|
I am trying to understand what's wrong with the following code on 2008 R2:
INSERT INTO [TransObjectSource].[dbo].[Quadrant] (Area)
VALUES(geography::STGeomFromText('POLYGON((45.835 5.9711, 45.835 6.1669,
45.928 6.1669, 45.928 5.9711, 45.835 5.9711))',4326) )
I get this error message:
Msg 6522, Level 16, State 1, Line 1
A .NET Framework error occurred during execution of user-defined routine or
System.ArgumentException: 24200: The specified input does not represent a
valid geography instance.
g, Int32 srid)
type, SqlChars taggedText, Int32 srid)
The statement has been terminated.
I have to point out I got this polygon definition from a table created and
populated in a DENALI CTP1 database.
Thanks for your help, now heading to bed after taking an aspirin.