Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:56:55+00:00 2026-06-01T14:56:55+00:00

I have a spatial model definition which used to be working with SQL Server

  • 0

I have a spatial model definition which used to be working with SQL Server 2008 but not with 2012 anymore.

I don’t know why but I can’t get it working…

model.Location = DbGeography.Parse("POINT(" + model.Latitude + " " + model.Longitude + ")");

I am getting this exception:

System.Reflection.TargetInvocationException was unhandled by user code
HResult=-2146232828
Message=Exception has been thrown by the target of an invocation.
Source=mscorlib
StackTrace:
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,
CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Data.SqlClient.SqlSpatialServices.GeographyFromText(String
geographyText)
at System.Data.Spatial.DbGeography.Parse(String geographyText)
at b.Helpers.Repository.saveFoursquareMarkers(List1 fs) in C:\Users\Administrator\Documents\Visual Studio
2010\Projects\b\Helpers\Repository.cs:line 182
at b.Controllers.KayController.GetMarkers(String lat, String lng, String type, Double dist, String today, String google) in
C:\Users\Administrator\Documents\Visual Studio
2010\Projects\b\Controllers\KayController.cs:line 29
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase
controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext, IDictionary
2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext, ActionDescriptor actionDescriptor, IDictionary2
parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeSynchronousActionMethod(ControllerContext
controllerContext, ActionDescriptor actionDescriptor, IDictionary
2
parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c_DisplayClass42.b_41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c_DisplayClass81.<BeginSynchronous>b__7(IAsyncResult
_)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult
1.End()
at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult
asyncResult, Object tag)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c
_DisplayClass37.<>c_DisplayClass39.b_33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c_DisplayClass4f.b_49()

InnerException: System.FormatException
HResult=-2146233033
Message=24141: A number is expected at position 21 of the input. The input has ,905651030368.
Source=Microsoft.SqlServer.Types
StackTrace:
at Microsoft.SqlServer.Types.OpenGisWktReader.RecognizeDouble()
at Microsoft.SqlServer.Types.OpenGisWktReader.ParsePointText(Boolean
parseParentheses)
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)
at Microsoft.SqlServer.Types.SqlGeography.STGeomFromText(SqlChars
geometryTaggedText, Int32 srid)
at Microsoft.SqlServer.Types.SqlGeography.Parse(SqlString s)

Any help ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:56:56+00:00Added an answer on June 1, 2026 at 2:56 pm

    It was really not understandable with this error but the problem was the localization of my computer.

    It was expecting a dot (.) rather than coma (,) as my decimal symbol. I’ve just set it from Start>Control Panel>Region and Language>Additional Settings and voila. It is working now.

    Thank you for your helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a SQL Server 2008 SQL Spatial equivalent to PostGIS DWithin? I have
I have (what I think) is a simple SQL Server spatial query: Grab all
I have two tables with the exact same schema in SQL Server 2008 Standard
I have a SQL Server database that I have migrated to SQL Server 2008.
I have lots of Polygons of datatype Geometry in SQL Server 2008. The image
We have a database called AVL in SQL Server 2008 R2 SE. This database
I have recently been researching the SQL Server spatial data types and have decided
I have records in a table representing bus routes, with SQL Server spatial columns
I have spatial data - (x, y) points on a plane - which I'm
I have Spatial Selection implemented on Map in my Web Application, which selects the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.