This question is locked. New answers and comments are not allowed.
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.
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)
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)