i think the part you'd need to repeat 15x would berow.setValue(fldName6, "No Violations")
but for each field and updated information. So you'd potentially have (fldName7,"New Value").. 15 lines of code inside your while loop if you were to do this outside of a loop. If you're doing the same thing for each field (i.e. converting 0 values to some sort of text) you could create a list of the fields then iterate through those for each row that you're on. so something like the following might work:rows = arcpy.UpdateCursor(inFeatures, query,'field_a;field_b;field_c... field_x')
field_list = ['field_a','field_b','field_c'...'field_x']
for row in rows:
for field in field_list:
field_x = 'row.' + field
row.setValue(field_x, "No Violations")
rows.UpdateRow(row)
This sort of thing gets more complicated of course depending on the number of different scenarios you have to handle, but you could work out a variety of if/else type statements to handle that sort of decision making. And yes, if the field is currently a double but you need a text value you need to create a new text field to capture that.One thing I'm not sure about in your code is the use of the while loop... maybe its a bit of preference but a 'for loop' might be more efficent, and it keeps you from having to call row.next so it simplifies your code a little bit. My understanding is that 'while loops' are good for checking on whether a particular condition has changed, which isn't really what you're doing in this example. The for loop simply steps through each row in your cursor, performing the actions you want on each row, then moving to the next row and repeating those actions.. until it reaches the end. Ultimately, I'm not sure this is a significant issue - your code obviously is working, but might be something to consider, and a lot of this may depend on how many rows you are dealing with.