Possible to edit query layers in 10.2?

3225
3
10-16-2013 07:27 AM
ErikEngstrom
Occasional Contributor II
We are in the process of creating Query Layers and/or leveraging the Microsoft SQL Spatial data type for delivering GIS data to our end users. We have several GIS data layers that contain spatial data and many SQL data tables that we'd like to create views for.

What we'd like to know, is whether or not we can edit these query layers/sql spatial tables in GIS once they have been created. Currently in <10.1, these query layers/sql spatial tables are read-only. Ideally, we'd love to be able to publish these query layers as feature layers within a feature service so that they could be edited using a mobile device and write data straight to the SQL tables from which may be used on other applications (not just GIS).

Is this at any way possible in 10.2. I had one person from ESRI stated that it would be possible, however I haven't seen it documented anywhere in the "What's new in 10.2" help document.
0 Kudos
3 Replies
MandarPurohit
New Contributor III
0 Kudos
ErikEngstrom
Occasional Contributor II
Anybody else?
I can edit a query layer that is simply a base table (essentially just a base table in SQL with a computed shape field, using the geometry/geography data type).

I'd ideally like to be able to edit a query layer that contains a join (or multiple joins).
I know that you can insert records into views within SQL Server (albeit not a very supported operation). It would be great if we could do this with ArcGIS.

My motivation is to use views that are already set up on the server, with a geometry table so that when a user goes into the field and starts editing with a mobile application, those edits will then be stored in their respective tables in the database, rather than stored JUST in the GIS table.
0 Kudos
WilliamCraft
MVP Regular Contributor
I don't believe editing the contents of the second (or third, fourth, etc.) table is possible if a join exists.  That being said, what type of application are you using to consume the service and perform edits?  It is possible to edit RELATED tables using functionality available through the various web APIs (Sliverlight, Flex, Javascript).  You might need to develop a custom widget to modify the related records assuming that you put relationship classes in place within the geodatabase.  Alternative, I am wondering if it might be possible to publish your query layer to a map service and then subsequently publish the individual tables as part of a feature service with Editing capabilities enabled.  As an example to this, I have configured a few Flex applications which use the map service for specific operations like identify and search but use the feature service when the editing widget it activated.  I just grabbed the layer or table endpoint IDs from the REST application and plugged those into my various Flex configuration files.
0 Kudos