Select to view content in your preferred language

FeatureLayer ObjectIDs are ignored

1025
6
07-12-2010 12:40 AM
egismazeika
Emerging Contributor
The documentation states: "If object ids are specified, other query parameters like Where are ignored."

Here's my code:
FeatureLayer edittingLayer;
<...>
edittingLayer.ObjectIDs = new int[] { 1 };
edittingLayer.Where = "1=1";
edittingLayer.Update();

All features are returned instead of single one.
0 Kudos
6 Replies
DominiqueBroux
Esri Frequent Contributor
ObjectIDs are working from version 10 of ArcGIS server.

Aren't  you using a 9.3 map service?
0 Kudos
egismazeika
Emerging Contributor
That was tested on ArcGIS Server 10 beta and final
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I just tested with the edit tools sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave

Adding the code below on a test button gives me a correct result (only one object is visible).
 
FeatureLayer featureLayer = MyMap.Layers["ThreatAreas"] as FeatureLayer;
featureLayer.ObjectIDs = new int[] { 8649 };
featureLayer.Where = "1=1";
featureLayer.Update();


What could be the difference with your case?
0 Kudos
egismazeika
Emerging Contributor
Thank you, Dominique. The sample works fine, but not my services.
I've tried on:
1. SQL Server 2008 (ArcSDE 9.3.1)
2. SQL Server 2008 Express DB created with ArcGIS 10.

Could the DBMS be the reason?
0 Kudos
JoelMcBeth
New Contributor
I'm using ArcGIS 10 with Microsoft SQL Server 2008. I have never been able to get a FeatureLayer to use the values in ObjectIDs, it ignores them completely and only uses the Where field for queries.

I just wanted to confirm that this wasn't an isolated incident and I would be interested in getting this working.
0 Kudos
JenniferNery
Esri Regular Contributor
Thank you for reporting this. We are aware of this issue and are working to get this bug fixed in future releases of the API.
0 Kudos