Thanks Dom. That solved the problem. I didn't realize there was a difference between the two syntaxes. However the bad news is I was chasing the wrong rabbit. I am trying to fix some code someone else wrote and frankly I don't understand it all that well. The actual problem has to do with a relationship query. This code :
Int32 MyVar = Convert.ToInt32(g.Attributes[SelectedRoadsTreeView.Tag as string]);
RelationshipParameter relationshipParameters = new RelationshipParameter()
{
ObjectIds = new int[] { Convert.ToInt32(g.Attributes[SelectedRoadsTreeView.Tag as string]) },
OutFields = new string[] { "loc_id, count_id, _year, adt" },
RelationshipId = 0,
OutSpatialReference = Map.SpatialReference
};
queryTask.ExecuteRelationshipQueryAsync(relationshipParameters);
fails when it runs with a message that there are missing or invalid parameters. The first line verifies that there is a valid objectid (739 in my case). The service that it is accessing is http://gismaps.pagnet.org/arcgis/rest/services/tempTrafficcounts/MapServer/0. Can you suggest what might be wrong? The problem may be with the service since the original was destroyed and we tried to recreate it. Perhaps I need something structured differently there? Thanks for any help.