Select to view content in your preferred language

Joined and related tables

879
1
10-04-2012 01:47 PM
TanyaOwens
Frequent Contributor
Building off of http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryRelatedRecords I have a single feature class that is joined to an sde table with a one to one relationship; I also have this feature class related to a different table (1 to many relationship). When I try to retrieve the related data I get the error "Query execute error: Error code '400': 'Invalid or missing input parameters.'". I can't seem to find anything wrong in the code. I was wondering in the following code if the call for ObjectIds is different if there is a table that is joined to the feature class:

                //Relationship query
                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 = 2,
                    OutSpatialReference = Map.SpatialReference
                };


I did notice in the service the fields are displayed with the feature layer or table name before the field name. This made a difference when I was pulling the fields to display in the data grid.

Thanks in advance for your help.
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
At first glance I don't see anything wrong in your code.
Could you use fiddler to look at the Relationship request sent to the server?
That might give a clue.
0 Kudos