OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.9k stars 2.55k forks source link

Error when trying to save FGDB - (The user does not have permission to execute the operation.) - Writing to relationship class #2238

Closed diego-teixeira closed 4 years ago

diego-teixeira commented 4 years ago

Expected behavior and actual behavior.

Hello, I did the advanced installation of QGIS by OSGEO4W, in order to be able to edit Arcgis feature classes (File Geodatabase -FGDB), but when trying to save changes to the table, the following message appears: "Failed updating row (The user does not have permission to execute the operation.) "or if you try to save edits (in the case of dividing) in the geometry this message appears:" Failed at writing Row to Table in CreateFeature. (The user does not have permission to execute the operation.) ". Does anyone know how I can fix this problem?

Note: I'm sorry for any mistakes, but I don't speak English.

Steps to reproduce the problem.

Operating system

Windows 10.0

GDAL version and provenance

3.0.3/3.0.4

FileGDB J12__04_11_2013.gdb.zip

rouault commented 4 years ago

Might be a pure QGIS issue, or an issue specific to Windows. The following use of OGR Python API works fine for me with GDAL master and FileGDB 1.5.1

from osgeo import ogr
ds = ogr.Open('J12__04_11_2013.gdb', update = 1)
lyr = ds.GetLayer(0)
f = lyr.GetNextFeature()
f['COD_EMPRESA'] = 'XX'
lyr.SetFeature(f)
from osgeo import ogr
ds = ogr.Open('J12__04_11_2013.gdb', update = 1)
lyr = ds.GetLayer(0)
f = lyr.GetNextFeature()
f.SetFID(-1)
lyr.CreateFeature(f)
diego-teixeira commented 4 years ago

Thanks @rouault, initially I opened the topic in the QGIS group, but as the error happens when I use the FileGDB edit feature, they asked to report here. I did a test and the error only happens when there is a relationship, for example, in the Talhoes layer. The test that you did and it worked, was using the Talhoes layer?

rouault commented 4 years ago

was using the Talhoes layer?

No, it was with the first layer AREAS_IMPRODUTIVAS. I can indeed reproduce the issue with the Talhoes layer. I don't think we can do anything about that though, as the error comes from the closed-source SDK itself.

diego-teixeira commented 4 years ago

Understand. Do you have any contact with ESRI to find out if they are aware of this error? It may be a limitation that they do not know and can resolve.

rouault commented 4 years ago

You may file the issue at https://github.com/Esri/file-geodatabase-api/issues (not guaranteeing this will receive attention from them)

diego-teixeira commented 4 years ago

@rouault , I don't want to reopen the topic unnecessarily, but I found a publication that seems to solve the problem (in the end it is said that it would take a few more steps), I don't know if it's my translator or lack of knowledge, but it was confusing for me . If you can help, I believe that with your developer knowledge you can tell if it is a possible solution to the failure. Thanks.

https://knowledge.safe.com/questions/3970/geodatabase-error-2147220987-the-user-does-not-hav.html

rouault commented 4 years ago

but it was confusing for me

for me too... Not sure if FME uses the public SDK or has access to anything. I'm re-opening the issue for documentation

langefz commented 3 years ago

I encountered the same problem when I used CreateFeature() to add features to annotation layers. Is there a solution now?This problem has been bothering me for several days without finding a solution