AnsweredAssumed Answered

What is wrong with this code: pWorkspace.FindVersion

Question asked by jsn on Jan 16, 2019
Latest reply on Jan 16, 2019 by jsn

Reposted under ArcObjects group.




pWorkspace = pWorkspaceFactory.OpenFromFile(prefixOutput, 0)

Dim version As IVersion = CType(pWorkspace, IVersion)

Dim versionName As String = version.VersionName

Dim targetVersion As IVersion = Nothing 


' check if working with Editor's version


If version.VersionName <> strEditorVersion Then

   targetVersion = CType(pWorkspace.FindVersion(strEditorVersion ), IVersion)   ************  It crashes here

End If




Error Message: Object reference not set to an instance of an object.Date1/16/2019