Hi,
I have a sqlite database containing trigger to manage constraints.
(see attached file)
If I try to violate a constraint with sqlite3, the right error message is returned:
sqlite> delete from unit;
SQL error: delete on table unit violates foreign key constraint fkd_unit_unit_rc_unit_id_id
sqlite> delete from unit;
SQL error: delete on table unit violates foreign key constraint fkd_unit_unit_rc_unit_id_id
To copy to clipboard, switch view to plain text mode

But, if I try to violate a constraint with QT API (QSqlQuery), this error message is returned by QSqlError::lastError():
constraint failed Impossible d'extraire la ligne
constraint failed Impossible d'extraire la ligne
To copy to clipboard, switch view to plain text mode

Do you know how to do to retrieve the right error message with QT API ?
In advance, thank you.
Bookmarks