from vrbls import *
arcpy.env.workspace = database
workspace = arcpy.env.workspace
arcpy.env.overwriteOutput = True
edit = arcpy.da.Editor(workspace)
insert_cursor = arcpy.da.InsertCursor(perm_bound, ["PermitNo", "FeatCLS", "Contact", "Source",
"National_ID", "Type_Flag", "Calc_Acres", 'SHAPE@'])
with arcpy.da.SearchCursor(perm_bound_file_geodb, ["PermitNo", "FeatCLS", "Contact", "Source", "National_ID",
"Type_Flag", "Calc_Acres", 'SHAPE@']) as cursor:
for row in cursor:
I do not have any problem using this code in a file geodatabase and it works fine. It does not work inside an enterprise geodatabase and does not insert any rows yet I do not get any error and it exits with zero code.
Solved! Go to Solution.
@Joe-Borgione Thank you for your answer. I have DBO and Admin credentials I am the one who run the scripts. I use the Admin connection on the data will be updated.
database = r'\\nrdsmnt6\mine maps\DMP_Database\ShapefileProcessing_SupportFiles\Connection_DMP_Admin.sde'
Should I do something else? I can not use append tool here because there are read locks and I am unable to remove locks to switch "unregister as versioned".
Thanks a lot @David-Pike, I copied and pasted the wrong lines. duh! exactly, where is stopOperation() and stopEditing(True) I did not even notice I did not stop editing. That was the problem.