QSqlError(3qt)
π QSqlError π
okay bestie, so this is the manual page for QSqlError from the Qt 3 docs β it's the little class that holds all the messy feelings (aka errors) your SQL database throws at you. It lives in the 3qt section of the manual, and ngl it's giving "tiny but mighty." Let's get into it π«Ά
β¨ NAME β¨
QSqlError β all the SQL database error info you could ever want π
π SYNOPSIS π
#include <qsqlerror.h>
πΈ Public Members πΈ
enum Type { None, Connection, Statement, Transaction, Unknown }QSqlError ( const QString & driverText = QString::null, const QString & databaseText = QString::null, int type = QSqlError::None, int number = -1 )QSqlError ( const QSqlError & other )QSqlError & operator= ( const QSqlError & other )virtual ~QSqlError ()QString driverText () constvirtual void setDriverText ( const QString & driverText )QString databaseText () constvirtual void setDatabaseText ( const QString & databaseText )int type () constvirtual void setType ( int type )int number () constvirtual void setNumber ( int number )QString text () constvoid showMessage ( const QString & msg = QString::null ) constβ (obsolete) π¨
π¦ DESCRIPTION π¦
So the QSqlError class is literally the place where SQL database error info lives. That's its whole job, and it ate. π
This class is what you use to report database-specific errors. Wanna know what went wrong and (if it's a thing) the database-specific error number too? You get both from this class. Iconic, frankly.
See also Database Classes. π
π§ Member Type Documentation π§
QSqlError::Type
This enum type is basically the vibe check for what kind of SQL error just happened to you. π
QSqlError::Noneβ no error occurred, we love a peaceful moment β¨QSqlError::Connectionβ connection error πQSqlError::Statementβ SQL statement syntax error πQSqlError::Transactionβ transaction failed error πQSqlError::Unknownβ unknown error, it's giving mystery π΅οΈ
π 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. Four little ingredients, one whole error π
QSqlError::QSqlError ( const QSqlError & other )
Creates a copy of other. Twin behavior, no cap π«Ά
QSqlError::~QSqlError () [virtual]
Destroys the object and frees any allocated resources. Clean up after yourself, bestie π§Ήβ¨
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. Sometimes it just doesn't know, and that's valid π
QSqlError & QSqlError::operator= ( const QSqlError & other )
Sets the error equal to other. Now they're matching π€π
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 number. π’
void QSqlError::setType ( int type ) [virtual]
Sets the error type to the value of type. π·οΈ
void QSqlError::showMessage ( const QString & msg = QString::null ) const
π¨ This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. fr fr, don't do it. π
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. Surprise popup, nobody asked π
See also text(), driverText(), and databaseText().
QString QSqlError::text () const
This is a convenience function that returns databaseText() and driverText() concatenated into a single string. Two texts, one glow-up β¨
See also showMessage(), driverText(), and databaseText().
int QSqlError::type () const
Returns the error type, or -1 if the type cannot be determined. Mystery era π΅οΈβοΈ
See also QSqlError::Type.
π SEE ALSO π
π 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. Not a human, not a girlie, just a generator doing its thing π€β¨
π 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 Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt 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. (iykyk, man page girlies stay winning π
)
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qsqlerror.3qt) and the Qt version (3.3.8). Details matter, bestie π
okay that's the whole page!! π this little cutie came from Trolltech AS, dated 2 February 2007, and the manual page itself is QSqlError(3qt) β version vibes: Qt 3.3.8. go forth and handle your errors with main character energy πβ¨ bye bestie!! π¦πΈ
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms