1

I am using updateCursor to retrieve some rows from a non spatial table using a connection of type "Spatial Database Connection" (That creates a .sde file) from ArcCatalog.

However, it doesn't work, I have the following error:

(RuntimeError('ERROR 000972: Table must have Object IDs in order to be sorted.',)))

Even if my table is not spatial (there is no objectid field).

Also, when I try to connect to another non spatial table from another database, It works and I can retrieve the rows.

Does anyone have a solution?

1

You must add a field of data type "AutoNumber" to be able to do some functions on the table. I usually name the field "OBJECTID".

  • 1
    Thanks for the reply, The table didnt have an objectid field indeed. It is not a problem in fact, because, I have just runned the command sde register, to register the table as an sde table, the primary key of the table acts like the objectid field. The command is : sdetable -o register -t [TABLE_NAME] -i sde:oracle11g:[SID] -c [PK_COLUMN] -C USER -u [USER] -p [PASSWORD] Thanks again – mde Jun 27 '13 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.