Hi Guru,I'm newbie in python. I'm trying to update the row in FC using this code :
import arcpy
from arcpy import env
fc_input = "C:\GIS\syafid.gdb\Alamat_Pos"
rowUpdate = arcpy.UpdateCursor(fc_input)
rowUpd = rowUpdate.next()
space = " "
while rowUpd:
address = rowUpd.getValue("BUILDING_NUMBER") + space + rowUpd.getValue("STREET_NAME") + space + rowUpd.getValue("PRECINCT_ID") + space + rowUpd.getValue("POST_CODE") + space + rowUpd.getValue("STATE_NAME")
print rowUpd.objectID_1,address
rowUpd.setValue("ALAMAT_POS",address)
rowUpdate.UpdateRow(rowUpd)
del rowUpd,rowUpdate
I got the error like this
IDLE 2.6.5 ==== No Subprocess ====
>>>
1 004 Jalan P8A/5 P08 0 Putrajaya
Traceback (most recent call last):
File "D:\python_code\postal_address.py", line 14, in <module>
rowUpdate.UpdateRow(rowUpd)
AttributeError: 'Cursor' object has no attribute 'UpdateRow'
Perhaps guru can guide me the right code..thanks.