Background documentation-35: Referential integrity violated Locate this document in the navigation structure

 

Explanation

This may be caused by one of the following:

  1. An INSERT or UPDATE statement issued on a table that is the referencing table in a referential CONSTRAINT definition produces a row that is not a matching row of the CONSTRAINT definition.

  2. Deleting rows from a referenced table in a referential CONSTRAINT definition using ON DELETE RESTRICT in the DELETE rule produces a matching row.

  3. When a referential CONSTRAINT definition is being executed, the referenced table or referencing table contains rows which conflict with the CONSTRAINT definition.

User Response
  1. Display the definition of the referential CONSTRAINT definition using a QUERY statement issued on the DOMAIN.FOREIGNKEYCOLUMNS system table. Correct the INSERT or UPDATE statement according to this definition.

  2. Use a suitable QUERY statement to find out which row of the referencing table prevents the required rows from being deleted from the referenced table.

  3. Use a suitable QUERY statement to find out which row of the referenced table or referencing table conflicts with the referential CONSTRAINT definition. Change or delete this row, or correct the CONSTRAINT definition.