Select to view content in your preferred language

Editing Features in a File Geodatabase

817
5
11-01-2010 10:54 AM
SaiDhalli
Emerging Contributor
I am able to  edit features which do not have any relationships , but I am getting an exception when I try to create an Update cursor on a feature class that has relationship classes. Here is the code I am using

IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;
                    workspaceEdit.StartEditing(false);
                    workspaceEdit.StartEditOperation();
IFeatureClass featureClass = GetFeatureClassFromFGDB(workspace, featureClassName); //Custom Function
IQueryFilter queryFilter = new QueryFilter();
queryFilter.WhereClause = GetWhereClause(.........);

IFeatureCursor featureCursor = featureClass.Update(queryFilter, true); >>> I am getting an exception at this point when I try to access feature classes with relationships.

Error message : "Objects in this class cannot be updated outside an edit session".

The error message does not seem to give correct information or it is something that I am missing.

Thanks,
Sai Dhalli
0 Kudos
5 Replies
ScottPio
Emerging Contributor
Any chance you found a solution to this problem?
0 Kudos
JonHall
Frequent Contributor
What level of ArcGIS Desktop licensing are you running?  Featureclasses with relationships require an ArcEditor or ArcInfo license to edit.
0 Kudos
AlexanderGray
Honored Contributor
I have gotten this intermittently too with an ArcInfo license.  Problem is it is not consistent.  I would like to know if there is a solution.
0 Kudos
JonHall
Frequent Contributor
RE: IFeatureCursor featureCursor = featureClass.Update(queryFilter, true);

Try it using False for recycling parameter
0 Kudos
srinivasaparadesi
Emerging Contributor
Hi All,

Any one got a solution for the same. Please share the solution. I am in need of a solution for the same kind of issue. Is this something bug in 9.3? I am not sure.

Regards,
Srinivasa.
0 Kudos