The user does not have permission to execute the operation

599
3
Jump to solution
11-15-2019 12:32 PM
Highlighted
New Contributor II

Hi all,

I am using  the File Geodatabase API v.1.5.1 with .NET and when I try to insert a new row into an existing Feature Class, I get the following the error "The user does not have permission to execute the operation".

1. Geodatabase geodatabase = Geodatabase.Open(@"C:\temp\MyTest.gdb");
2. Table table = geodatabase.OpenTable("\\MyFeatureClass"); 

3. Row newRow = table.CreateRowObject();

4. PointShapeBuffer sb = new PointShapeBuffer();
5. sb.Setup(ShapeType.Point);
6. Point point = new Point(x,y);
7. sb.point = point;

8. newRow.SetGeometry(sb);

9. table.Insert(newRow);

10. geodatabase.Close();

What I have noticed is that the property table.IsEditable is false in my test. In the "Editing" sample that comes with the API it works fine when they open the "Cities" Feature class. The property table.IsEditable is set to true. Is this related to the problem I am seeing?

BTW the geo database I am playing with, is created in ArcGis Pro 2.4.2.

Is there a way to solve the issue?

Many thanks in advance,

Greg

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
New Contributor II

Apparently there are limitations that prohibit users from altering the data. Below is an extract from the manual.

Limitations of the File Geodatabase API

While the File Geodatabase API supports reading the schema and data of complex geodatabase types, the API does not honor geodatabase behavior on inserts, deletes or updates to the following dataset types:

  • Annotation and Dimension feature classes
  • Relationship Classes
  • Networks (GN and ND)
  • Topologies
  • Terrains
  • Representations
  • Parcel Fabrics

In most cases the API will prevent users from attempting to edit objects with complex behavior, but the onus is on the developer to understand what they should and should not edit through the API and avoid editing datasets that have geodatabase behavior. There is a method called Table::IsEditable which will provide developers with the ability to determine whether a dataset can be safely edited.

Other limitations of the File Geodatabase API:

  • Rasters (Raster Dataset, Raster Catalog, Mosaic Datasets and Raster Attributes) are not supported.
  • Spatial queries with the File Geodatabase API will be limited to the envelope-intersects operator.
  • Secure (licensed) Data is not supported.

View solution in original post

Reply
0 Kudos
3 Replies
Highlighted
New Contributor II

I found this Geodatabase Error (-2147220987): The user does not have permission to execute the operation. which doesn't help at all as I am not using any writer. In fact I do not know what they are. I just use file geodatabase API to open a db from file and insert a row into a feature class.

Reply
0 Kudos
Highlighted
New Contributor II

I am attaching a sample project that demos the problem. The project is built using the x64 dlls from the API.

Reply
0 Kudos
Highlighted
New Contributor II

Apparently there are limitations that prohibit users from altering the data. Below is an extract from the manual.

Limitations of the File Geodatabase API

While the File Geodatabase API supports reading the schema and data of complex geodatabase types, the API does not honor geodatabase behavior on inserts, deletes or updates to the following dataset types:

  • Annotation and Dimension feature classes
  • Relationship Classes
  • Networks (GN and ND)
  • Topologies
  • Terrains
  • Representations
  • Parcel Fabrics

In most cases the API will prevent users from attempting to edit objects with complex behavior, but the onus is on the developer to understand what they should and should not edit through the API and avoid editing datasets that have geodatabase behavior. There is a method called Table::IsEditable which will provide developers with the ability to determine whether a dataset can be safely edited.

Other limitations of the File Geodatabase API:

  • Rasters (Raster Dataset, Raster Catalog, Mosaic Datasets and Raster Attributes) are not supported.
  • Spatial queries with the File Geodatabase API will be limited to the envelope-intersects operator.
  • Secure (licensed) Data is not supported.

View solution in original post

Reply
0 Kudos