I have a Qt application, using QSqlDatabase, and I need to take a different action on a unique key constraint violation as opposed to any other type of error.
Currently, the backend database is SQLite, if that matters. However, management is talking about switching to MS SQL Server, so if the solution is database-specific, I'll need one for both.