I am trying to add new point from table using XY coordinates fields to database. I can add point without fields, but when i try to add point with field values i can not do it. In SearchCursor ID is a field from data table and in InsertCursor 'dazianebis_tipi' is a field I want to update by ID field. Here is code i use:
with arcpy.da.SearchCursor("Watersupply_GWP.DBO.%GIS_ACCIDENTS",["PointCoordinateX","PointCoordinateY","ID"])as cursor:
for row in cursor:
point.X = row[0]
point.Y = row[1]
req_ID = row[2]
rowValues = [[req_ID,((point_Geometry_out.centroid.X),( point_Geometry_out.centroid.Y))]]
cur = arcpy.da.InsertCursor(fcc,['dazianebis_tipi','SHAPE@XY'])
for row in rowValues:
cur.insertRow(row)