This error message is associated with a number of possible causes. Here are two reasons:
1- If your SDE data is not versioned. In this case, simply register your data as versioned using ArcCatalog.
2- If you connected to your SDE geodatabase programmatically using IPropertySet, and the server name used is an alias name instead of the original server name. Use the IPropertySet.GetAll properties() method to investigate the exact names of all the properties you would need to supply to the IPropertySet. It is easier to simply connect via the SDE connection file.
For detailed information about creating features and Managing Edit Sessions using ArcObjects, please view the following documentation in the ArcObjects Help:
Creating Features
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/Creating_features/00010000049v000000/
Managing Editing Sessions and Edit Operations
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/Managing_edit_sessions_and_edit_operations/000100000340000000/
Please note that if your featureclass contains attachments and you're in SDE, you'll have to use an additional ArcObject: IMultiuserWorkspaceEdit
IMapServer3 ms = (IMapServer3)this.mapServerDataAccess; IDataset fc = this.mapServerDataAccess.GetDataSource(ms.DefaultMapName, 0) as IDataset; IFeatureWorkspace workspace = (IFeatureWorkspace)fc.Workspace; IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)fc.Workspace; workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); IFeatureClass fClass = workspace.OpenFeatureClass(layer); IFeature feature = fClass.CreateFeature(); // Removed lines where assigning data to the feature... feature.Store(); workspaceEdit.StopEditOperation(); workspaceEdit.StopEditing(true);
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.