AnsweredAssumed Answered

Retrieve current SDE version

Question asked by olivoyer on Aug 3, 2012
Latest reply on Aug 3, 2012 by olivoyer
Hi,

I'm trying to get the current SDE version, for example "SDE.DEFAULT" of the current workspace.

I'm currently using the following code, but it always returns "SDE.DEFAULT", even when I'm connected to another version.

IWorkspace workspace = ((IDataset)ArcMap.Document.ActiveView.FocusMap.Layer[0]).Workspace; IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; String strVer = versionedWorkspace.DefaultVersion.VersionName;


I'm using ArcObjects 9.2.

Thanks!

Oli

Outcomes