Problem with queryFeatures in firefox/chrome?

453
1
12-12-2013 06:11 AM
EdwardSohn1
New Contributor
I keep getting errors in calling queryFeatures.

            var query = new esri.tasks.Query();
            query.outFields = outfieldsList;
            buildWhereClause();
            if (whereClause) {
                query.where = whereClause;
            }
            if (geometry) {
                query.returnGeometry = true;
                query.geometry = geometry;
                query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
                query.outSpatialReference = featureLayer.spatialReference;
            }

           featureLayer.queryFeatures(query, function (featureSet) {

           }, function (e) {
                alert(e.message);
            });

Unable to load http://10.8.11.30:6080/arcgis/rest/services/Wells/MapServer/0/query?f=json&where=U_SONEDW%3E0.0&retu...... status: 0
(I abbreviate the outFields list with '...')

But this happens only with firefox and chrome.  Not IE (using IE 11).
It only happens when the whereClause = 'U_SONEDW>=0.0', and only on the second subsequent times (not the first time).
I.e. if I change the whereClause to something else then it seems to go through.
And only when deployed to II7 web server.  Not in VS2012 development web server.

Also another funny thing is sometimes it just magically works...
0 Kudos
1 Reply
SebastianRoberts
Occasional Contributor III
I think you might be suffering from the same bug discussed in the thread below.  Basically you need to make each query string unique and you can do that by adding a time stamp.

http://forums.arcgis.com/threads/73932-query.task-intermitent-error-Unable-to-complete-operation?hig...

Regards,
Sebastian
0 Kudos