VERIFIED SOLUTION i
X

How to resolve the Referential Integrity error "Error while updating entity key: 'xxxxx' in map. Exception: 'Object reference not set to an instance of an object' within Confirm

Issue

Error "Error while updating entity key: 'xxxxx' in map. Exception: 'Object reference not set to an instance of an object.' encountered when running the referential integrity agent.

Cause

This is normally caused because the actual map layer (.MAP) has no spatial data to visually display it on the map, but it has an entry in the .TAB attribute data of the map layer.

Resolution

UPDATED: March 29, 2018


To correct one entry:
  1. Suspend the Referential Integrity agent and open the map layer file in Mapinfo Professional®.
  2. Open the table associated with the map layer and search for the entry in question. Once selected in the table, delete this entry, pack and save the table for re-use in Confirm.
  3. Overwrite existing RI Layer and re run the Referential Integrity Agent.

In order to identify all objects that have no geometry you can use the SQL Select functionality in MapInfo.

The following SQL will recall all invalid objects:
 
SELECT *
FROM ORIGINAL_TABLE
WHERE Str$(obj) = ""

Using the SQL Select function, the above SQL can be transposed as thus:

Select Columns: SELECT *
from Tables: ORIGINAL_TABLE
where Condition: Str$(obj) <> ""
into Table Named: Use the same name as the original, but save the files to a different location. This can then be used in Confirm without having to modify any config in the system.

Pack the resulting table in MapInfo and save using the same name as the original file to avoid any complications when overwriting the original file in Confirm with cleansed data.

Re load the map layer file into Confirm, enable and run the Referential Integrity Agent.

Environment Details

Products affected: Confirm®

Downloads

  • No Downloads