Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QSqlError Class Reference

List of all members.

Detailed Description

The QSqlError class provides SQL database error information.


A QSqlError object can provide database-specific error data, including the driverText() and databaseText() messages (or both concatenated together as text()), and the error number() and type(). The functions all have setters so that you can create and return QSqlError objects from your own classes, for example from your own SQL drivers.

See also:
QSqlDatabase::lastError(), QSqlQuery::lastError()

Definition at line 33 of file qsqlerror.h.

Public Types

enum  ErrorType {
  NoError, ConnectionError, StatementError, TransactionError,

Public Member Functions

QString databaseText () const
QString driverText () const
bool isValid () const
int number () const
QSqlErroroperator= (const QSqlError &other)
 QSqlError (const QSqlError &other)
 QSqlError (const QString &driverText=QString(), const QString &databaseText=QString(), ErrorType type=NoError, int number=-1)
void setDatabaseText (const QString &databaseText)
void setDriverText (const QString &driverText)
void setNumber (int number)
void setType (ErrorType type)
QString text () const
ErrorType type () const
 ~QSqlError ()

Private Attributes

QString databaseError
QString driverError
int errorNumber
ErrorType errorType

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index