QSqlError(3qt)

NAME
QSqlError - SQL database error information

SYNOPSIS
#include <ntqsqlerror.h>

  Public Members
enum Type { None, Connection, Statement, Transaction, Unknown }
QSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = QSqlError::None, int number = -1 )
QSqlError ( const QSqlError & other )
QSqlError & operator= ( const QSqlError & other )
virtual ~QSqlError ()
TQString driverText () const
virtual void setDriverText ( const TQString & driverText )
TQString databaseText () const
virtual void setDatabaseText ( const TQString & databaseText )
int type () const
virtual void setType ( int type )
int number () const
virtual void setNumber ( int number )
TQString text () const
void showMessage ( const TQString & msg = TQString::null ) const (obsolete)

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.

QSqlError::None - no error occurred

QSqlError::Connection - connection error

QSqlError::Statement - SQL statement syntax error

QSqlError::Transaction - transaction failed error

QSqlError::Unknown - unknown error

MEMBER FUNCTION DOCUMENTATION

QSqlError::QSqlError ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::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.

TQString QSqlError::databaseText () const
Returns the text of the error as reported by the database. This may contain database-specific descriptions.

TQString 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 TQString & databaseText ) [virtual]
Sets the database error text to the value of databaseText.

void QSqlError::setDriverText ( const TQString & 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 number.

void QSqlError::setType ( int type ) [virtual]
Sets the error type to the value of type.

void QSqlError::showMessage ( const TQString & msg = TQString::null ) const
This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

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 msg parameter, which will be concatenated with the text() message.

See also text(), driverText(), and databaseText().

TQString QSqlError::text () const
This is a convenience function that returns databaseText() and driverText() concatenated into a single string.

See also showMessage(), driverText(), and databaseText().

int QSqlError::type () const
Returns the error type, or -1 if the type cannot be determined.

See also QSqlError::Type.

SEE ALSO
http://doc.trolltech.com/ntqsqlerror.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqsqlerror.3qt) and the Qt version (3.3.8).