AnsweredAssumed Answered

IVersion  how can I check and change the current transactional version

Question asked by jsn on Aug 21, 2018

Hello everyone,

 

I would like to know how to  check the current  IVersion (transactional connection) using C# or VB.net and change it to the right one if the one that comes on the default file is wrong.

 

 

pWorkspace = pWorkspaceFactory.OpenFromFile(prefixOutput, 0)

pFeatureWorkspace = pWorkspaceFactory.OpenFromFile(prefixOutput, 0)

 

Dim muWorkspaceEdit As IMultiuserWorkspaceEdit = CType(pFeatureWorkspace, IMultiuserWorkspaceEdit)

 Dim pworkspaceEdit As IWorkspaceEdit = CType(pFeatureWorkspace, IWorkspaceEdit)

'startediting

'muWorkspaceEdit.StartEditing(False)

muWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned)

pworkspaceEdit.StartEditOperation()

'reconcile current version

'Get the version name.

Dim version As IVersion = CType(pWorkspace, IVersion)

Dim versionName As String = version.VersionName

'

' check correct Transactional version

'

  

' Reconcile the version. Modify this code to reconcile And handle conflicts

' appropriately for the specific application.

'

Dim versionEdit4 As IVersionEdit4 = CType(pWorkspace, IVersionEdit4)

versionEdit4.Reconcile4(versionName, True, False, True, True)

Outcomes