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.