Hi all;Since the servers were updated to 10.2.2, all the queries freaked out...so anyways I read the docs on ESRI's help page about the changes required, for SQL injection prevention and things like that. So in my code, I really dont think I have any software specific codes in relation to the queries. Anyway I have a bunch of points, and each has relationship with other tables and features, this is for landmark types, media, address...etc. So I was getting the 2023 error initially when the queries were being called, I explicitly made the queries to use GET instead of POST and useAMF is false. The errors still are there, sometimes they show up, other times they dont. [RPC Fault faultString="Error performing query related records operation" faultCode="500" faultDetail=""]
You can see the beta app here:http://www.digitaleg.com/Digital_Egypt/EGIPA/Map_En.htmlThis is strange because the points are loaded initially based on a relationship query, but no errors, but the error is generated when further relationship queries are sent. Here is a block of the relevant code, trimmed as much as possible:
//This function sometimes works and sometimes doesnt. But the points always load. It is the popup error that sometimes shows and sometimes doesnt.
private function doQueryLandmarkMensHair(event:Event) : void
{ landmarkTypeQueryTask = null;
landmarkTypeQueryTask = new QueryTask;
landmarkTypeQueryTask.useAMF = false;
var landmarksRelationshipQuery:RelationshipQuery = new RelationshipQuery();
landmarksRelationshipQuery.objectIds = [182];
landmarksRelationshipQuery.relationshipId = 3;
landmarksRelationshipQuery.returnGeometry = true;
landmarksRelationshipQuery.outSpatialReference = myMap.spatialReference;
landmarkTypeQueryTask.method = URLRequestMethod.GET;
landmarkTypeQueryTask.url = "url here";
landmarkTypeQueryTask.executeRelationshipQuery(landmarksRelationshipQuery, new AsyncResponder(onLandmarksMensHairResult, onRelationshiptQueryFault, null));
}
//This function sometimes works and sometimes doesnt. But the points always load. It is the popup error that sometimes shows and sometimes doesnt.
private function onLandmarksMensHairResult( result:Object, token:Object = null ) : void
{
landmarkResultsCount = result[182].features.length;
landmarksGraphicsLayer.clear();
for each (myLandmarksGraphic in result[182].features)
{
selectedLandmarkObjectID = myLandmarksGraphic.attributes.OBJECTID;
landmarksGraphicsLayer.add(myLandmarksGraphic);
landmarksADGVar.landmarksADG.dataProvider = result[182].attributes;
}
}
<esri:GraphicsLayer id="landmarksGraphicsLayer" click="landmarksClickHandler(event);"/>
//The below function is when the error is generated from one of the relationship queries
�?? private function launchLandmarkDetails():void
{
landmarkInfoQuery.relationshipId = 5;
landmarkInfoQuery.outFields = ["*"];
landmarkInfoQuery.returnGeometry = true;
landmarkInfoQuery.outSpatialReference = myMap.spatialReference;
landmarkPanoramaQuery.relationshipId = 0;
landmarkPanoramaQuery.outFields = ["MediaEName" , "L5" , "L2"];
landmarkPanoramaQuery.returnGeometry = true;
landmarkPanoramaQuery.outSpatialReference = myMap.spatialReference;
landmarkPanoramaQuery.definitionExpression = "MediaType = 2";
landmarkPicturesQuery.relationshipId = 2;
landmarkPicturesQuery.outFields = ["MediaEName" , "L4" , "L1"];
landmarkPicturesQuery.returnGeometry = true;
landmarkPicturesQuery.outSpatialReference = myMap.spatialReference;
landmarkPicturesQuery.definitionExpression = "MediaType = 1";
queryTaskLandmarkPanorama.method = URLRequestMethod.GET;
queryTaskLandmarkPanorama.useAMF = false;
queryTaskLandmarkPanorama.url = "url";
queryTaskLandmarkPanorama.executeRelationshipQuery(landmarkPanoramaQuery, new AsyncResponder(landmarkRVResult, onRelationshiptQueryFault, null));
queryTaskLandmarkInfo.method = URLRequestMethod.GET;
queryTaskLandmarkInfo.useAMF = false;
queryTaskLandmarkInfo.url = "url";
queryTaskLandmarkInfo.executeRelationshipQuery(landmarkInfoQuery, new AsyncResponder(landmarkInfoResult, onRelationshiptQueryFault, null));
queryTaskLandmarkPictures.method = URLRequestMethod.GET;
queryTaskLandmarkPictures.useAMF = false;
queryTaskLandmarkPictures.url = "url";
queryTaskLandmarkPictures.executeRelationshipQuery(landmarkPicturesQuery, new AsyncResponder(landmarkPicturesResult, onRelationshiptQueryFault, null));
function landmarkInfoResult(landmarkInfoResultVar:Object, infoToken:Object = null):void
{
//do some stuff, read the data
}
function landmarkRVResult(landmarkPanoramaResultVar:Object, mediaToken:Object = null):void
{
//do some stuff, read the data
}
function landmarkPicturesResult(landmarkPicturesResultVar:Object, mediaToken:Object = null):void
{
//do some stuff, read the data
}
}Any ideas guys?