Select to view content in your preferred language

Query Task Fails - Version 2.1

1790
1
12-16-2011 03:28 AM
LakshmananVenkatesan
Frequent Contributor
Hello Experts,

I am doing query task to find the records in polygon layer,  which are spatially intersecting with input geometry . Query task always goes to failed event with Error code 400 and message "Unable to complete  operation." wither inner details "Unable to complete Query operation."

Input geometry is polygon shape (81 vertices) with 12 inner rings . If I pass simple polygon query task works fine.  How to solve this issue?. Please help me

Sliverlight version: 2.1.0.446


Pseudo code
                        QueryTask areaInfo = new QueryTask(url);
                        areaInfo.ExecuteCompleted += new EventHandler<QueryEventArgs>(areaInfo_ExecuteCompleted);
                        areaInfo.Failed += new EventHandler<TaskFailedEventArgs>(areaInfo_Failed);                     
                        ESRI.ArcGIS.Client.Tasks.Query query = new Query();
                        query.Geometry = geometry;
                        //Set the fields to return from the query.
                        query.SpatialRelationship = SpatialRelationship.esriSpatialRelIntersects;
                        query.OutFields.Add("*");
                        query.ReturnGeometry = true;
                        //Call the ExecuteAsync method to run the query.
                        areaInfo.ExecuteAsync(query);
                    }
                   
     SR
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Have you checked this SDK sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SpatialQuery. Kindly run Fiddler with your app and check to see what geometry is sent, does it include SpatialReference?
0 Kudos