Error: The record set passed in did not have an OID field
When attempting to programmatically geocode a table of addresses that does not contain an OID field using a geocoding server in a remote context the following error message is returned:
"The record set passed in did not have an OID field."
When geocoding a table of addresses that does not contain an OID field, using a geocode server, the process cannot be run.
An ObjectID field is required for the table of addresses. It used by the client application to associate geocoding results returned from the geocode server to records in the address table being geocoded. Geocode servers can change the order of the records when the job is batched and passed to different hosts. The results returned by the geocode server include the ObjectID of the original address record so that the client can do the job of associating the geocoding result with the original record.
Solution or Workaround
Export the table of addresses to a data format that has an ObjectID field, such as a DBF table or a Geodatabase table.