IWorkspaceFactory pWorkspaceFactory = new SdeWorkspaceFactory(); IWorkspace workspace = pWorkspaceFactory.OpenFromFile(path, 0); IPropertySet propSet = workspace.ConnectionProperties; IFeatureWorkspace pWorkspace = pWorkspaceFactory.Open(propSet, 0) as IFeatureWorkspace; ITable table = pWorkspace.OpenTable("GISLCSA.GISEDITOR.MetaID"); ILayer tableLayer = table as ILayer; pMetaIDTable = table as ITable; UID uid = new UIDClass(); uid.Value = "esriEditor.Editor"; IEditor editor = m_application.FindExtensionByCLSID(uid) as IEditor; if (editor.EditState == esriEditState.esriStateNotEditing) { try { editor.StartEditing(workspace ); } catch (Exception e) { MessageBox.Show(e.Message); } }
Solved! Go to Solution.
You can create a new IStandaloneTable, set it's Table and Name properties and add it to the map via IStandaloneTableCollection. You could also just start your edit session using IWorkspaceEdit instead of using the Editor extension.