I am attempting to edit a multiversioned view using SQL. I set the feature class to versioned, created the view from command line using "sdetable -o create_mv_view", and try to run an update with SQL on a single attribute field but receive the error:
Msg 50000, Level 16, State 1, Procedure v446_update, Line 27
User must call edit_version before editing the view.
If I try to call edit_version I get:
Msg 50000, Level 16, State 1, Procedure edit_version, Line 78
Cannot edit the DEFAULT version in STANDARD transaction mode.
I am running ArcGIS and ArcSDE 10.0 SP3 on SQL Server 2008. The ability to edit the Default version through multiversioned views is available at version 10 SP2 according to http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_editing_versioned_data....
http://support.esri.com/en/knowledgebase/techarticles/detail/39112 describes this behavior also. Not specifying an edit version still gives me the first error above.
Just to be sure, I removed all other versions, compressed to state 0, unversioned the feature class, reverionsed, and recreated the view, but still have the same problem.
Does anyone successfully use views in this way and what version is the server running? Is the documentation wrong?
Solved! Go to Solution.
Paul -
What you are thinking seems correct that since you are at 10.0 sp2 or higher that this should work without setting the version first - you also shouldn't have to call edit_version. Have you tried to just execute the sql directly without calling edit_version or setting the version? Take a look at this KB
39112 - Cannot edit the DEFAULT version in STANDARD transaction mode
What type of geometry is the feature class?
You could edit the DEFAULT version with SQL through versioned views if one or more of the following are true at your site:
Paul -
What you are thinking seems correct that since you are at 10.0 sp2 or higher that this should work without setting the version first - you also shouldn't have to call edit_version. Have you tried to just execute the sql directly without calling edit_version or setting the version? Take a look at this KB
39112 - Cannot edit the DEFAULT version in STANDARD transaction mode
What type of geometry is the feature class?
You could edit the DEFAULT version with SQL through versioned views if one or more of the following are true at your site:
I am trying to update a non-spatial field and have not specified a version. My SQL is simple.
UPDATE mv_view SET datafield = 1
I think the feature class is using SDE Binary. I did not think it would make a difference when trying to update non-spatial fields.