Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 5 down vote accepted

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 :)

share|improve this answer
you should mark your answer as accepted so that it can help other people who may have the same problem – user3461 Aug 7 '12 at 16:04
Upvote for himself 'idiot' epiphany. – Magno C Feb 6 '13 at 11:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.