Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 4 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
1  
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
add comment

Your Answer

 
discard

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.