SQL - SQLCODE's - Códigos negativos -531


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

SQLCode -531

   
 
  • Causa
    • PARENT KEY IN A PARENT ROW CANNOT BE UPDATED BECAUSE IT HAS ONE OR MORE DEPENDENT ROWS IN RELATIONSHIP constraint-name.

      For plans and packages bound beginning with Version 5 or dynamic SQL, a multi-row update of a parent key attempted to remove a parent key value on which a foreign key was dependent.

      For plans and packages bound prior to Version 5 an UPDATE operation attempted to update a primary key in the specified row of the object table; however, the primary key in the specified row had dependent rows associated with it.
      The value of a primary key in a parent row cannot be updated if the parent row has any dependent rows.
  • Ação do sistema
    • The UPDATE statement cannot be executed.
      The object table is unchanged.
  • Resposta ao Desenvolvedor
    • Examine the parent key of the object table and the foreign key of the dependent table to determine if the value of the specified row of the parent keyshould be changed.
      If this does not expose the problem, examine the contents of the object table and the dependent table to determine the cause of the problem.

      SQLSTATE: 23504

© Copyright IBM Corp.