Select to view content in your preferred language

Get Error from Query

991
6
11-02-2011 06:32 PM
sidneykelvin
Emerging Contributor
Dear All,

I am writing a pretty simple Query but got error message and cannot figure out why.

private function setQueryDistrict(district:String):void
{
var query_District:Query = new Query();
if (district == "All District") district = "";
query_District.where = "DIST_ENAME like '%" + district.toLocaleUpperCase() + "%'";
query_District.returnGeometry = true;
query_District.outFields = ["DIST_ENAME,OBJECTID"];

queryTask_DistBound.execute(query_District, new AsyncResponder(onQueryResult, onQueryFault));

function onQueryResult(featureSet:FeatureSet, token:Object = null):void
{
  //zoomToSelected(featureSet.attributes[0].OBJECTID,false);
}
function onQueryFault(info:Object, token:Object = null):void
{
  Alert.show(info.toString());
}
}

Error message code receive on the line 'Alert.show(info.toString());'

Error #2032: 串流�?�誤�?? URL: http://cedd6288/ArcGIS/rest/services/LIC/MapServer/82/query?where=DIST%5FENAME%20like%20%27%25ISLAND...

Please note that it work normally in the page "ArcGIS Service Directory"

Thanks in advance for any help
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Sydney,

   Try changing this:

query_District.outFields = ["DIST_ENAME","OBJECTID"];
0 Kudos
sidneykelvin
Emerging Contributor
Error Still Exist.

Is there anything related to spatialRelationship? as there is something strange with the error message :

Error #2032: 串æµ�é?¯èª¤ã??...//cedd6288/ArcGIS/rest/services/LIC/MapServer/82/query?where=DIST%5FENAME%20like%20%27%25ISLANDS%25%27&outFields=DIST%5FENAME%2COBJECTID&returnGeometry=false&spatialRel=esriSpatialRelIntersects&f=amf

Thanks for your help !!!
0 Kudos
IvanBespalov
Frequent Contributor
Error #2032 is StreamError.

I tried to get a similar error and i got id:

1 - if service URL is wrong

Fault details: Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://  ivanbespalov.argisonline.com/ArcGIS/rest/services...


2 - if service URL is OK, but not accessible or not available at the moment

3 - may be something wrong with your crossdomain.xml (read adobe forums)


Note: if URL is OK, but some of query params WRONG you got not Error #2032: StreamError - you got responce from ArcGIS server with fault message = "Unable to complete Query operation.".
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sidney,

   If you are using ArcGIS Server 9.3.1 or lower than you also would want to set queryTask_DistBound.useAMF = false;
0 Kudos
sidneykelvin
Emerging Contributor
I set queryTask_DistBound.useAMF = false and it WORKS .

Thanks you very much.

I wonder if this could still work in ArcGIS server 10.

Regards
Sidney
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Sidney,

   Yes having useAMF set to false will working on a ArcGIS 10 server as well.
0 Kudos