Spatial query error: "The query does not accept parameters, but valid params were passed for query"

2 posts, 1 answers
  1. Ryan
    Ryan avatar
    9 posts
    Member since:
    Sep 2012

    Posted 05 Mar 2014 Link to this post

    Hi. The following linq query fails with an OpenAccess error that I don't understand. I'm using SQL Server 2012 and the latest version of Data Access.
    The variables s.geom and myGeomPoint in the below query are SQL geometry types.

    var myList = (from s in db.Suburbs where (bool)s.geom.STIntersects(myGeomPoint) select s.SuburbName).ToList();

    The error is: "The query does not accept parameters, but valid params were passed for query excecution"

    Stack trace:
       at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
       at OpenAccessRuntime.ExceptionWrapper.Throw()
       at OpenAccessRuntime.storagemanager.logging.LoggingStorageManager.fetchNextQueryResult(ApplicationContext context, RunningQuery runningQuery, Int32 skipAmount)
       at OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.getNextQueryResult(QueryResultWrapper aQrs, Int32 skipAmount)
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.Initialize()
       at OpenAccessRuntime.DataObjects.ForwardQueryResult.get_Item(Int32 indexParam)
       at OpenAccessRuntime.ListEnumerator.setCurrent(Int32 _pos)
       at OpenAccessRuntime.ListEnumerator.Move(Int32 relative)
       at OpenAccessRuntime.ListEnumerator.MoveNext()
       at Telerik.OpenAccess.Query.TypedEnumerator`1.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at halfmouse.UrbanNexus.Web.Secure.RouteToWork.RadAjaxManager1_AjaxRequest(Object sender, AjaxRequestEventArgs e) in c:\WIP\Carpool\halfmouse.UrbanNexus\halfmouse.UrbanNexus.Web\Secure\RouteToWork.aspx.cs:line 70
       at Telerik.Web.UI.RadAjaxControl.OnAjaxRequest(AjaxRequestEventArgs args)
       at Telerik.Web.UI.RadAjaxControl.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  2. Answer
    Ady avatar
    588 posts

    Posted 10 Mar 2014 Link to this post

    Hello Ryan,

    Should we continue the resolution to this problem via ticket '795221' ? This would help in maintaining a single point of reference. Maybe you can close this ticket.

    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  3. DevCraft banner
Back to Top