AnsweredAssumed Answered

Delete a feature class from a SDE database failed

Question asked by yuluoli156@gmail.com on Jun 11, 2020
Latest reply on Jun 18, 2020 by yuluoli156@gmail.com

When I tried to use arcpy.management.Delete(fc) to delete a feature class from a SDE database, it failed with error message " ERROR 000601: Cannot delete ..\SECore_Tools_Testing_sde.DBO.point_windmill.  May be locked by another application. Failed to execute (Delete)." 

 

Then I add the following code before delete the feature class:

edit = arcpy.da.Editor(arcpy.env.workspace)
edit.startEditing(False, True)
edit.startOperation()

arcpy.management.Delete(fc)

edit.stopOperation()

edit.stopEditing(True)

 

I got different error message " ERROR 000496: table is being edited. Failed to execute (Delete)."

 

Please help! Thanks.

Outcomes