Python - insert records to MS Access - error

694
3
04-05-2018 01:05 PM
RobertMEIER
Occasional Contributor

I'm trying to use Python arcpy to append records to an MS Access table, from a feature class. I keep running into the error:

RuntimeError: ERROR 999999: Error executing function.
You cannot add or change a record because a related record is required in table 'Valid_Locations'

Where 'Valid_Locations' is a related LookUp table. I understand the relationship/referential integrity, etc. I am not inserting a value that is not in the lookup table.

So any ideas?

I get this error whether I use the Append tool/command and field mappings,etc. or using an InsertCursor.

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

arcmap or pro?

0 Kudos
RobertMEIER
Occasional Contributor

ArcMap - Python 2.7

0 Kudos
RobertMEIER
Occasional Contributor

sorry for the post - my insert cursor code was wrong, I was trying to insert the row before setting all the values. Once I fixed that, I was able to add the rows without error.

Still don't know why the Append tool won't work.