QueryTask not returning results when it should!

Discussion created by crackernutter on Apr 14, 2012
Latest reply on Apr 24, 2012 by DSwingley-esristaff
So I am trying to do something very simple - return the points for the USGS Steam Flow Station layer ( that fall within the District of Columbia.  There should be 3. 

First I construct a QueryTask to get the District of Columbia layer

      var queryTask = new esri.tasks.QueryTask(districtURL);
  var query = new esri.tasks.Query();
               query.returnGeometry = true;
               query.outFields = ["*"];
        query.where = "CITY_NAME = 'Washington'"
               query.outSpatialReference = map.spatialReference;
        queryTask.execute(query, queryResults, errorCall);

I've verified that this works - one feature is returned.  However, when I try to query the points in Steam Flow Station layer against this result, I get an error since null results are returned!

function queryResults(featureSet){
     var queryTaskWithin = new esri.tasks.QueryTask("");
     var query = new esri.tasks.Query();
            query.returnGeometry = true;
     query.outFields = ["*"];
     query.outSpatialReference = map.spatialReference;
     query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_WITHIN;
     query.geometry = featureSet.features[0].geometry;
     dojo.connect(queryTaskWithin, "onComplete", function(fset) {
 }, function(error){console.log("error" + error)});

At one point I was getting 0 results and no error, but now I'm just getting an error.  I thought this should be a simple task - any assistance would be of great help. 

Also, the spatial references of the district layer and the Steam Flow Station layer are seemingly different.  One is 102100 and the other is 3857.  But I think those are both web mercator so it shouldn't matter too much, right?