<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt - 3.3.8 - espenr - 2499/qt - x11 - free - 3.3.8/src/sql/tqsqlerror.cpp:42 -->
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=ISO-8859-1" >
< title > TQSqlError Class< / title >
< style type = "text/css" > < ! - -
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
-->< / style >
< / head >
< body >
< table border = "0" cellpadding = "0" cellspacing = "0" width = "100%" >
< tr bgcolor = "#E5E5E5" >
< td valign = center >
< a href = "index.html" >
< font color = "#004faf" > Home< / font > < / a >
| < a href = "classes.html" >
< font color = "#004faf" > All Classes< / font > < / a >
| < a href = "mainclasses.html" >
< font color = "#004faf" > Main Classes< / font > < / a >
| < a href = "annotated.html" >
< font color = "#004faf" > Annotated< / font > < / a >
| < a href = "groups.html" >
< font color = "#004faf" > Grouped Classes< / font > < / a >
| < a href = "functions.html" >
< font color = "#004faf" > Functions< / font > < / a >
< / td >
< td align = "right" valign = "center" > < img src = "logo32.png" align = "right" width = "64" height = "32" border = "0" > < / td > < / tr > < / table > < h1 align = center > TQSqlError Class Reference< br > < small > [< a href = "sql.html" > sql module< / a > ]< / small > < / h1 >
< p > The TQSqlError class provides SQL database error information.
< a href = "#details" > More...< / a >
< p > < tt > #include < < a href = "tqsqlerror-h.html" > tqsqlerror.h< / a > > < / tt >
< p > < a href = "tqsqlerror-members.html" > List of all member functions.< / a >
< h2 > Public Members< / h2 >
< ul >
< li class = fn > enum < a href = "#Type-enum" > < b > Type< / b > < / a > { None, Connection, Statement, Transaction, Unknown }< / li >
< li class = fn > < a href = "#TQSqlError" > < b > TQSqlError< / b > < / a > ( const TQString & driverText = TQString::null, const TQString & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )< / li >
< li class = fn > < a href = "#TQSqlError-2" > < b > TQSqlError< / b > < / a > ( const TQSqlError & other )< / li >
< li class = fn > TQSqlError & < a href = "#operator-eq" > < b > operator=< / b > < / a > ( const TQSqlError & other )< / li >
< li class = fn > virtual < a href = "#~TQSqlError" > < b > ~TQSqlError< / b > < / a > ()< / li >
< li class = fn > TQString < a href = "#driverText" > < b > driverText< / b > < / a > () const< / li >
< li class = fn > virtual void < a href = "#setDriverText" > < b > setDriverText< / b > < / a > ( const TQString & driverText )< / li >
< li class = fn > TQString < a href = "#databaseText" > < b > databaseText< / b > < / a > () const< / li >
< li class = fn > virtual void < a href = "#setDatabaseText" > < b > setDatabaseText< / b > < / a > ( const TQString & databaseText )< / li >
< li class = fn > int < a href = "#type" > < b > type< / b > < / a > () const< / li >
< li class = fn > virtual void < a href = "#setType" > < b > setType< / b > < / a > ( int type )< / li >
< li class = fn > int < a href = "#number" > < b > number< / b > < / a > () const< / li >
< li class = fn > virtual void < a href = "#setNumber" > < b > setNumber< / b > < / a > ( int number )< / li >
< li class = fn > TQString < a href = "#text" > < b > text< / b > < / a > () const< / li >
< li class = fn > void showMessage ( const TQString & msg = TQString::null ) const < em > (obsolete)< / em > < / li >
< / ul >
< hr > < a name = "details" > < / a > < h2 > Detailed Description< / h2 >
The TQSqlError class provides SQL database error information.
< p >
< p > 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.
< p > See also < a href = "database.html" > Database Classes< / a > .
< hr > < h2 > Member Type Documentation< / h2 >
< h3 class = fn > < a name = "Type-enum" > < / a > TQSqlError::Type< / h3 >
< p > This enum type describes the type of SQL error that occurred.
< ul >
< li > < tt > TQSqlError::None< / tt > - no error occurred
< li > < tt > TQSqlError::Connection< / tt > - connection error
< li > < tt > TQSqlError::Statement< / tt > - SQL statement syntax error
< li > < tt > TQSqlError::Transaction< / tt > - transaction failed error
< li > < tt > TQSqlError::Unknown< / tt > - unknown error
< / ul >
< hr > < h2 > Member Function Documentation< / h2 >
< h3 class = fn > < a name = "TQSqlError" > < / a > TQSqlError::TQSqlError ( const < a href = "tqstring.html" > TQString< / a > & driverText = TQString::null, const < a href = "tqstring.html" > TQString< / a > & databaseText = TQString::null, int type = TQSqlError::None, int number = -1 )
< / h3 >
Constructs an error containing the driver error text < em > driverText< / em > , the database-specific error text < em > databaseText< / em > , the
type < em > type< / em > and the optional error number < em > number< / em > .
< h3 class = fn > < a name = "TQSqlError-2" > < / a > TQSqlError::TQSqlError ( const < a href = "tqsqlerror.html" > TQSqlError< / a > & other )
< / h3 >
Creates a copy of < em > other< / em > .
< h3 class = fn > < a name = "~TQSqlError" > < / a > TQSqlError::~TQSqlError ()< tt > [virtual]< / tt >
< / h3 >
Destroys the object and frees any allocated resources.
< h3 class = fn > < a href = "tqstring.html" > TQString< / a > < a name = "databaseText" > < / a > TQSqlError::databaseText () const
< / h3 >
Returns the text of the error as reported by the database. This
may contain database-specific descriptions.
< h3 class = fn > < a href = "tqstring.html" > TQString< / a > < a name = "driverText" > < / a > TQSqlError::driverText () const
< / h3 >
Returns the text of the error as reported by the driver. This may
contain database-specific descriptions.
< h3 class = fn > int < a name = "number" > < / a > TQSqlError::number () const
< / h3 >
Returns the database-specific error number, or -1 if it cannot be
determined.
< h3 class = fn > < a href = "tqsqlerror.html" > TQSqlError< / a > & < a name = "operator-eq" > < / a > TQSqlError::operator= ( const < a href = "tqsqlerror.html" > TQSqlError< / a > & other )
< / h3 >
Sets the error equal to < em > other< / em > .
< h3 class = fn > void < a name = "setDatabaseText" > < / a > TQSqlError::setDatabaseText ( const < a href = "tqstring.html" > TQString< / a > & databaseText )< tt > [virtual]< / tt >
< / h3 >
Sets the database error text to the value of < em > databaseText< / em > .
< h3 class = fn > void < a name = "setDriverText" > < / a > TQSqlError::setDriverText ( const < a href = "tqstring.html" > TQString< / a > & driverText )< tt > [virtual]< / tt >
< / h3 >
Sets the driver error text to the value of < em > driverText< / em > .
< h3 class = fn > void < a name = "setNumber" > < / a > TQSqlError::setNumber ( int number )< tt > [virtual]< / tt >
< / h3 >
Sets the database-specific error number to < em > number< / em > .
< h3 class = fn > void < a name = "setType" > < / a > TQSqlError::setType ( int type )< tt > [virtual]< / tt >
< / h3 >
Sets the error type to the value of < em > type< / em > .
< h3 class = fn > void < a name = "showMessage" > < / a > TQSqlError::showMessage ( const < a href = "tqstring.html" > TQString< / a > & msg = TQString::null ) const
< / h3 >
< b > This function is obsolete.< / b > It is provided to keep old source working. We strongly advise against using it in new code.
< p > This is a convenience function that pops up a < a href = "ntqmessagebox.html" > TQMessageBox< / a >
containing the message returned by < a href = "#text" > text< / a > (). An additional string
can be passed in via the < em > msg< / em > parameter, which will be
concatenated with the text() message.
< p > < p > See also < a href = "#text" > text< / a > (), < a href = "#driverText" > driverText< / a > (), and < a href = "#databaseText" > databaseText< / a > ().
< h3 class = fn > < a href = "tqstring.html" > TQString< / a > < a name = "text" > < / a > TQSqlError::text () const
< / h3 >
This is a convenience function that returns < a href = "#databaseText" > databaseText< / a > () and
< a href = "#driverText" > driverText< / a > () concatenated into a single string.
< p > < p > See also < a href = "#showMessage" > showMessage< / a > (), < a href = "#driverText" > driverText< / a > (), and < a href = "#databaseText" > databaseText< / a > ().
< h3 class = fn > int < a name = "type" > < / a > TQSqlError::type () const
< / h3 >
Returns the error type, or -1 if the type cannot be determined.
< p > < p > See also < a href = "#Type-enum" > TQSqlError::Type< / a > .
<!-- eof -->
< hr > < p >
This file is part of the < a href = "index.html" > TQt toolkit< / a > .
Copyright © 1995-2007
< a href = "http://www.trolltech.com/" > Trolltech< / a > . All Rights Reserved.< p > < address > < hr > < div align = center >
< table width = 100% cellspacing = 0 border = 0 > < tr >
< td > Copyright © 2007
< a href = "troll.html" > Trolltech< / a > < td align = center > < a href = "trademarks.html" > Trademarks< / a >
< td align = right > < div align = right > TQt 3.3.8< / div >
< / table > < / div > < / address > < / body >
< / html >