Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QSqlError Class Reference
[sql module]

The QSqlError class provides SQL database error information. More...

#include <qsqlerror.h>

List of all member functions.

Public Members


Detailed Description

The QSqlError class provides SQL database error information.

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.

See also Database Classes.


Member Type Documentation

QSqlError::Type

This enum type describes the type of SQL error that occurred.


Member Function Documentation

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 driverText, the database-specific error text databaseText, the type type and the optional error number number.

QSqlError::QSqlError ( const QSqlError & other )

Creates a copy of other.

QSqlError::~QSqlError () [virtual]

Destroys the object and frees any allocated resources.

QString QSqlError::databaseText () const

Returns the text of the error as reported by the database. This may contain database-specific descriptions.

QString QSqlError::driverText () const

Returns the text of the error as reported by the driver. This may contain database-specific descriptions.

int QSqlError::number () const

Returns the database-specific error number, or -1 if it cannot be determined.

QSqlError & QSqlError::operator= ( const QSqlError & other )

Sets the error equal to other.

void QSqlError::setDatabaseText ( const QString & databaseText ) [virtual]

Sets the database error text to the value of databaseText.

void QSqlError::setDriverText ( const QString & driverText ) [virtual]

Sets the driver error text to the value of driverText.

void QSqlError::setNumber ( int number ) [virtual]

Sets the database-specific error number to the value of number.

void QSqlError::setType ( int type ) [virtual]

Sets the error type to the value of type.

int QSqlError::type () const

Returns the error type, or -1 if the type cannot be determined.

See also QSqlError::Type.


This file is part of the Qt toolkit. Copyright © 1995-2003 Trolltech. All Rights Reserved.


Copyright © 2003 TrolltechTrademarks
Qt version 3.1.2