I have written code for multi user editing for our project. However, two users cannot edit the features at same time. Please help
What is the data source for this editing application? You should be sure to use multiuser sources (databases) for multiuser applications.
- V
Hi Anilo,
Just to add onto Vince's post, if you are using ArcGIS for Desktop to edit your data, and your source data is stored in an enterprise geodatabase, then you can leverage the versioned editing functionality.
An overview of versioning—ArcGIS Help | ArcGIS for Desktop
Hope this helps,
Thanks Vince and Derek,
Thanks for your replies..
I am using Enterprise SDE, and using SDE.QAQC version Datasource. Issue is, users can edit the data from any locations if there is no edit conflicts. However, when multiple users try creating features at same time, SDE allows only one user to save edits, and the others are thrown exceptions like ..
1. "Objects in this class cannot be updated outside an edit session"
2. "The version has been redefined to reference a new database state. "
3. "Exception from HRESULT:0x80041055"
4. "The Work Space cannot being edited. [SDE.QAQC]"
etc.,
Now, I don't understand where the issue is? I have used
IMultiuserWorkspaceEdit muConsumerWorkspaceEdit = (IMultiuserWorkspaceEdit)pConFtrCls.FeatureDataset.Workspace;
IWorkspace pConWrkspce = pConFtrCls.FeatureDataset.Workspace;
IWorkspaceEdit pConWorkspaceEdit = pConWrkspce as IWorkspaceEdit;
....
if (!muConsumerWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned))
{
throw new ArgumentException("The workspace does not support versioned editing.");
}
muConsumerWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned);
if (pConWorkspaceEdit.IsBeingEdited()) { pConWorkspaceEdit.StopEditing(true); }
pConWorkspaceEdit.StartEditing(false);
pConWorkspaceEdit.StartEditOperation();
ESRI.ArcGIS.Geodatabase.IFeature pConsumerFtr = pConFtrCls.CreateFeature();
//Then I am filling the shape and all other attributes..
//Then storing the feature
pConsumerFtr.Store();
pConWorkspaceEdit.StopEditOperation();
/////////////////
Please help.. I am not understanding where I went wrong. Seems everything fine. Still, multiuser editing is not happening.
Have you tried creating a version for each user below the QAQC. That way they are editing in a different "space" of version thread (can't think of the correct term right now). Each user will want to reconcile to pull any updates from QAQC at the start of the edit session (at least). When they post to QAQC, if there are conflicts, they can be reviewed at that time.
That is how we typically do this in any case.
Thank you for your reply Rebecca,
That sounds great! I will definitely give a try. But, do I have to create new version each time?
Hi Anil,
I am not a developer and can't help with your custom code. I suggest you post your question (with the custom code) in these discussion threads:
ArcObjects SDK and Geodatabase
Good luck,
No issues Derek, thanks for your help!!
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.