FileGDBException: The user does not have permission to execute the operation.

6357
24
Jump to solution
11-17-2014 05:08 AM
PrzemyslawTyrtania
New Contributor

I'm getting this error when trying to execute table.Delete(row), the error is thrown on the first row. There are many tables in this file geodatabase so I've tried with different ones for some tables it works and for others it doesn't. These are all standalone tables, no relationships, editor tracking is not on. File geodatabase is generated from a 10.2.2 geodatabase. This table has a few fields and the only field that stands out is Settings which is defined as nvarchar(max) in geodatabase.

Fields:

ObjectID

Name: text 255

Settings: text 1073741822

ModifiedTime: date

Version: Text 255

SettingsType: Text 255

RowCollection rowCollection = table.Search("*", whereClause, RowInstance.Unique);

foreach (Row row in rowCollection)

{

                    table.Delete(row);

}

0 Kudos
24 Replies
PrzemyslawTyrtania
New Contributor

Yea, that works, we deleted the table from FGDB, copy paste from geodatabase and it worked fine, but this FGDB is created daily by our py script so its not a solution.

0 Kudos
LanceShipman
Esri Regular Contributor

It's not being proposed as a solution. At this point we are still trying to understand what is happening. Without having a local reproducible case it is hard to diagnose isuse like this. Copy/Paste is very good at finding relationships.

Was the table previously part of relationship class or network or topology? If you copy/paste from the original non-file geodatabase to a new file geodatabase what do you get?

0 Kudos
PrzemyslawTyrtania
New Contributor

thanks for your help!

0 Kudos
VinceAngelo
Esri Esteemed Contributor

Better to get a portion of that screenshot which is legible than to get everything.  It's the icons associated with objects that Lance is trying to see.

- V

0 Kudos
PrzemyslawTyrtania
New Contributor

if all you're trying to see is if there is a relationship to the table then i can tell you that there is not, otherwise you'd see that in relationships tab, but below is a screenshot that is sorted by type that shows all relationships and another one showing the table

0 Kudos
PrzemyslawTyrtania
New Contributor

If there is something else i can look at please let me know.

0 Kudos
VinceAngelo
Esri Esteemed Contributor

When you work out how to get IsEditable to return true, you might want to try to truncate the table using Geodatabase::ExecuteSQL with "DELETE FROM tablename" without a WHERE clause or spatial constraint. It will likely be much faster than iterating the rows in an unbounded query and deleting each.

- V

0 Kudos
PrzemyslawTyrtania
New Contributor

So we deleted everything from the sde database except the table in question and created fgdb from it and it still failed with same error, then we created new PGDB and exported the table to that database, then delete futura_settings table from sde then copied it from pgdb to sde and then exported to fgdb then it worked fine.

0 Kudos
VinceAngelo
Esri Esteemed Contributor

So it sounds like your enterprise geodatabase metadata was corrupt, and that was passed through to the FGDB by Copy_management, so the API was seeing the table as non-simple.  Once the table really was simple, then IsEditable returned true, and you were able to delete.  If you have a copy of the data in its corrupt state, I expect Tech Support would want to look at it.

- V

0 Kudos
PrzemyslawTyrtania
New Contributor

I was going to attach the databases to the message but I'd prefer something more secure so if you can email me and provide me with a way to upload then i'll do that, total size of the files is about 12 mb so I don't think I can attach to the email: przemyslawt@futuragis.com

0 Kudos