The QSqlError class provides SQL database error information.
.PP
This class is used to report database-specific errors. An error description and (if appropriate) a database-specific error number can be obtained using this class.
.PP
See also Database Classes.
.SS "Member Type Documentation"
.SH "QSqlError::Type"
This enum type describes the type of SQL error that occurred.
.SH "QSqlError::QSqlError ( const QString & driverText = QString::null, const QString & databaseText = QString::null, int type = QSqlError::None, int number = -1 )"
Constructs an error containing the driver error text \fIdriverText\fR, the database-specific error text \fIdatabaseText\fR, the type \fItype\fR and the optional error number \fInumber\fR.
.SH "QSqlError::QSqlError ( const QSqlError & other )"
Creates a copy of \fIother\fR.
.SH "QSqlError::~QSqlError ()\fC [virtual]\fR"
Destroys the object and frees any allocated resources.
.SH "QString QSqlError::databaseText () const"
Returns the text of the error as reported by the database. This may contain database-specific descriptions.
.SH "QString QSqlError::driverText () const"
Returns the text of the error as reported by the driver. This may contain database-specific descriptions.
.SH "int QSqlError::number () const"
Returns the database-specific error number, or -1 if it cannot be determined.
.SH "QSqlError & QSqlError::operator= ( const QSqlError & other )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
This is a convenience function that pops up a QMessageBox containing the message returned by text(). An additional string can be passed in via the \fImsg\fR parameter, which will be concatenated with the text() message.
.PP
See also text(), driverText(), and databaseText().
.SH "QString QSqlError::text () const"
This is a convenience function that returns databaseText() and driverText() concatenated into a single string.
.PP
See also showMessage(), driverText(), and databaseText().
.SH "int QSqlError::type () const"
Returns the error type, or -1 if the type cannot be determined.