| Previous | Next |
| SQLITE_E_CANTOPEN_FULLPATH | SQLITE_E_READONLY_DBMOVED |
SQLITE_E_CONSTRAINT_FOREIGNKEY
SQLITE_E_CONSTRAINT_FOREIGNKEY corresponds to SQLITE_CONSTRAINT_FOREIGNKEY. A child row refers to a parent row that does not exist, or a parent row was changed or removed while referenced by child rows.
What to check
- Confirm that foreign key enforcement is enabled for the connection; it is configured per connection in SQLite.
- Use
PRAGMA foreign_key_checkto locate existing violations in a copy or controlled maintenance session. - Review the intended parent/child lifecycle and any
ON DELETEorON UPDATEaction before changing data.
PRAGMA foreign_keys;
PRAGMA foreign_key_check;
SQLite: SQLITE_CONSTRAINT_FOREIGNKEY
Looking for a different code? Search another status or error code.