I am surprised that am unable to select the features on SDE views on ArcGIS Server. Problem is I have created several views from SDE tables and added as layer in ArcMap using Tools—>Add XY being point layer. I have developed tool to select features by dragging rectangle/polygon on the map; am using layer description object to show the selected features by changing its selection symbol and color. I also had another interesting observation that I’ve used ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy .QueryFeatureIDs to get FIDset for the layer passed. It always returned entire records instead of records meeting spatial condition. I could not figure out the reason for this cause that much easily; I assumed that may be because of any projection issues so that envelope rectangle/polygon not overlaying with layer but that is the not the case.
The view which I added in mxd has OBJECTID field but which is of not type OBJECTID, hence ArcGIS does not recognize the same. I have used another method ESRI.ArcGIS.ADF.ArcGISServer.RecordSet to fetch the records that matching spatial condition that works fine and returns the intersected records exactly; but still selected features symbol colors not been changed. I’m till confused on this behavior.
when I opened the mxd and saw the layer properties-> Symbol Tab– ‘Show Selection Features’ pane is freezed. When I check the ESRI help it clearly says that if layer does not have ObjectID it is not possible to do any selections . Though I have created views with two tables one having field objectID is of type OBJECTID still view’s OBJECTID field type is of long integer. I am unable to set even set unique ID field to objectID as ArcGIS does not accepts and prompts me the error message.
Either I need to create a feature class from the view and use it or I need to register as versioned . I do not want both of them since tables were updated frequently by another department; hence am restricted to keep this as table and use as a view in GIS application.
Now options (learnt from ESRI forums).
“A view can also be created in the DBMS referencing the existing layer’s row_id attribute (objectid) and then registered with ArcSDE”.
“The only way a view will support an objectid is if the source table’s objectid column is a registered rowid column for that table, *and* you use ‘sdetable -o create_view’ to create that view. I would strongly encourage you to use a geometry column in your table. Most databases support a native geometry type, which
would allow an update trigger to reposition the geometry when the coordinate column is modified.”
I have to work this and test the application again. if any one have similar experience or having idea on this let me know. Though I have worked with featureclass and other form of data; working with SDE view is still new to me. I always hear that view same as featureclass and also it same as Oracle views; but this issue makes me to think once again. This is new learning for me. This is truly challenging one for me though it would be easy one.
Looking for some replies….
Update: I have successfully created the views and able to do selections.