What does HRESULT 0x87AF0113 (SQLITE_E_CONSTRAINT_CHECK) mean?

 
Previous Next
SQLITE_E_CANTOPEN_NOTEMPDIR SQLITE_E_NOTICE_RECOVER_WAL

SQLITE_E_CONSTRAINT_CHECK

SQLITE_E_CONSTRAINT_CHECK corresponds to SQLITE_CONSTRAINT_CHECK: a CHECK expression evaluated to false or zero for an INSERT or UPDATE.

What to check

  • Find the exact CHECK expression in the deployed schema and evaluate it with the same bound values.
  • Check for differences between the schema expected by the application and the schema actually present on this database.
  • Treat NULL carefully: SQLite CHECK constraints pass when the expression evaluates to NULL, not only when it evaluates to true.
SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'your_table';

SQLite: SQLITE_CONSTRAINT_CHECK

SQLite: CHECK constraints

SQLite: Conflict Resolution


Looking for a different code? Search another status or error code.