QSqlError Class
The QSqlError class provides SQL database error information. More...
| Header: | #include <QSqlError> |
| qmake: | QT += sql |
Public Types
| enum | ErrorType { NoError, ConnectionError, StatementError, TransactionError, UnknownError } |
Detailed Description
A QSqlError object can provide database-specific error data, including the driverText() and databaseText() messages (or both concatenated together as text()), and the nativeErrorCode() and type().
See also QSqlDatabase::lastError() and QSqlQuery::lastError().
Member Type Documentation
enum QSqlError::ErrorType
This enum type describes the context in which the error occurred, e.g., a connection error, a statement error, etc.
| Constant | Value | Description |
|---|---|---|
QSqlError::NoError | 0 | No error occurred. |
QSqlError::ConnectionError | 1 | Connection error. |
QSqlError::StatementError | 2 | SQL statement syntax error. |
QSqlError::TransactionError | 3 | Transaction failed error. |
QSqlError::UnknownError | 4 | Unknown error. |