emilharold

UpdateCursor, updateRow not working

Discussion created by emilharold on Jun 11, 2013
Latest reply on Jun 11, 2013 by emilharold
I can't figure out why my updateRow is not working. It's supposed to make an update to an entry in field Manufactur if a condition is met (val == xfrkv).

The code runs fine and the arcpy.AddMessages are correct, but the field does not get updated. Any help?

Code snidbit:
   rows = arcpy.UpdateCursor(relloc)
   for row in rows:
      global val
      val = row.getValue(field)
      if val == xfrkv:
         arcpy.AddMessage ("\nRelationship found with table " + relloc + ".")
         row.Manufactur = manu
         rows.updateRow(row)
         arcpy.AddMessage ('\nUpdating table ' + c + '\'s field "Manufactur" with ' + manu + '.\n')
         del row
         del rows
         break

Outcomes