What is wrong with this code: pWorkspace.FindVersion

276
1
01-16-2019 12:29 PM
JoseSanchez
Occasional Contributor III

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

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

0 Kudos
1 Reply
JoeHershman
MVP Regular Contributor

This is an ArcObjects question not ArcGIS Runtime, you may want to post in that forum:

https://community.esri.com/groups/arcobjectsnet  

0 Kudos