problem creating an UpdateCursor for an OLE DB

1609
1
08-30-2011 11:10 AM
DustinReagan
New Contributor
I'm trying to simply do:

updateRows = arcpy.UpdateCursor("Database Connections/Marshall_East.odc/LeaseSchedule")


which is failing with the following RuntimeError:
"Handling run-time error: ERROR 999999: Error executing function.
An underlying database error occurred. [LeaseSchedule]
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."

Is there any way to "Check each OLE DB status value" from within the arcpy environment?

Creating a SearchCursor on the same DB, and iterating over the rows works fine.  Any clues would be appreciated.

Thanks,
Dustin
Tags (2)
0 Kudos
1 Reply
ChrisSnyder
Regular Contributor III
Don't know about how to "check each OLE DB status value", but some probable issues:

1. You forgot to delete the searchcursor object, and locks persit on the table (that's why you can't update it).
   or
2. Since your ODBC table (probably) doesn't have an OBJECTID field, the ESRI updatecursor method might not work. I know it used to be in v9.3 that your couldn't use the cursor sort parameter (in a search or update cursor) unless there was an OBJECTID field. You could always make your table drink the ESRI-brand coolaid and import it using CopyRows or TableToTable or some other tool - thus auto creating an OBJECTID field...
0 Kudos