Select to view content in your preferred language

SDE locking

2699
2
12-13-2012 12:10 AM
PaulHastings1
Deactivated User
i have an app that "clones" features via a QueryTask from an SDE-backed feature service, changes some attributes & re-inserts them via a FeatureLayerTask into the same feature service. seems to be working fine except that every now & again we're seeing errors with a 400 fault code with either:


  • Another application is currently editing the version. [sde.DEFAULT]

  • Lock request conflicts with an established lock [sde.DEFAULT]

error messages. the features seem to be inserted ok even when these errors are thrown.

should we be concerned about this? is our approach correct? any workarounds besides swallowing these particular errors?

thanks.
Tags (2)
0 Kudos
2 Replies
cristiBJ
Deactivated User
Can you explain more about how you do the clones, I have a similar task to do. Thank you.
0 Kudos
PaulHastings1
Deactivated User
basically do an asynch query on the features you want to clone. if these are in many layers, capture each query result as it comes back in until you have accounted for all the layers' features you want to clone. then use FeatureLayerTask to re-create them in your mapservice (in this case same mapservice which is probably why i'm seeing the locking issues).

see this thread for code for the latter part (capturing cloned layers/features then applying edits to the map service, kind of simple):

http://forums.arcgis.com/threads/66726-clone-features?p=232950
0 Kudos