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);
}
Solved! Go to Solution.
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.
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?
thanks for your help!
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
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
If there is something else i can look at please let me know.
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
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.
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
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