AnsweredAssumed Answered

Reconcile but not working

Question asked by shaningesri on Jul 12, 2017
Latest reply on Jul 13, 2017 by shaningesri

I created child version from an myEdit version.  Then, I edited a featureLayer of the child version in ArcMap.  Then I tried to reconcile the child version to its parent version: myEdit (by referring to the source code: How to reconcile versions ) using the code below.  However, after implementing this piece of code, the FeatureClass in the target version does not show any edits I made.  I am not sure I have missed anything.  Appreciate if you can share your experience.   


// the related code

bool Reconcile_ToParentVersion()   {
            bool conflicts = false;
            IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)m_userWorkspace;

            if (sParentVersionName == "") {
                if (m_editorVersion.HasParent())  {
                    IVersionInfo versionInfo = m_editorVersion.VersionInfo;
                    sParentVersionName = versionInfo.Parent.VersionName;

            IVersion targetVersion = versionedWorkspace.FindVersion(sParentVersionName) ;
            IVersionEdit4 versionEdit = (IVersionEdit4)m_editorVersion;         
            if (m_muWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned) && targetVersion != null)  {
                //Reconcile with the target version.
                conflicts = versionEdit.Reconcile4(targetVersion.VersionName, true, false, false, false);

            return conflicts;;