AnsweredAssumed Answered

ArcGIS Pro SDK CoreHost - Feature.Store inside Geodatabase.ApplyEdits throws GeodatabaseObjectClassException

Question asked by jorma.karjalainen.tieto on Jun 12, 2019
Latest reply on Jun 13, 2019 by jorma.karjalainen.tieto

Hi ArcGIS Pro SDK professionals,

 

I am trying to create a stand-alone CoreHost application. It's quite easy task if you are an experienced ArcObjects SDK developer.

 

I have a problem when I try to save edits to the Oracle SDE geodatabase. Feature.Store() method "inside" Geodatabase.ApplyEdits() throws an exception:

 

ArcGIS.Core.Data.GeodatabaseObjectClassException: Objects in this object class cannot be updated outside of an edit session. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80041354
at ArcGIS.Core.Internal.IRowIOP.Row_Store(IntPtr rowHandle)
at ArcGIS.Core.Data.GeodatabaseUtil.Store(IntPtr rowHandle)
--- End of inner exception stack trace ---
at ArcGIS.Core.Data.GeodatabaseUtil.Store(IntPtr rowHandle)
...

 

I have tried to save edits without ApplyEdits. Same result.

 

The feature class is a non-versioned SDE feature class (database table). It has lots of relationship classes (sub database tables).

 

If I edit data (using the same source code) of another feature class (without relationship classes), no exceptions are thrown. That's why I wonder if the CoreHost implementation does not support editing non-versioned feature class having relationship classes.

 

Do you have any idea what I am doing wrong? Or is there really above-mentioned restriction?

 

Jorma

Outcomes