2

I'm attempting to query a polyline layer using the ArcGIS Javascript API I all ready have a lot of experience doing this with Point layers. So I set my Polyline layer up the same way and stopped and started my service again to get every thing going. When I run the query (specifically when I run PolylineQueryTask.execute()) I get an error that just says the operation can't be completed. There is some code below that shows how I'm setting my query layer up. Any ideas on what I can do to fix this issue or things I should try?

PolylineQueryTask = new esri.tasks.QueryTask("http://" + DomainAddress + "/ArcGIS/rest/services/SNND/MapServer/1");
PolylineQuery = new esri.tasks.Query();
PolylineQuery.returnGeometry = true;
PolylineQuery.outFields = ["ObjID"];
PolylineQuery.where = 'where 1 = 1';
PolylineQueryTask.execute(PolylineQuery, ShowPolylineResults, FatlError);

So as you can see from my code I should be getting all my polylines back. Any thoughts are very appreciated.

asked Aug 7, 2012 at 15:21

1 Answer 1

5

Found my problem and I feel like a complete moron for my screw up seeing as how I've used this function so many times before.

PolylineQuery.where = 'where 1 = 1';

the above line should be

PolylineQuery.where = '1 = 1';

I don't need to specify the word 'where'

I'm an idiot :)

answered Aug 7, 2012 at 15:50
1
  • Upvote for himself 'idiot' epiphany. Commented Feb 6, 2013 at 11:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.