No Error Type From Qsqlerror
Code Review Qt Documentation Qt 4.8 QtSql QSqlError Contents Public Types Public Functions Detailed qsqlquery lasterror Description QSqlError Class The QSqlError class provides SQL database qsqldatabase error information. More... Header: #include
QString & databaseText = QString::null, int type = QSqlError::None, int number = -1 ) QSqlError ( const QSqlError & other ) QSqlError & operator= ( const QSqlError & other ) virtual ~QSqlError () QString driverText () const virtual void setDriverText ( const QString & driverText ) QString databaseText () const virtual void setDatabaseText ( const QString & databaseText ) int type () const virtual void setType ( int type http://doc.qt.io/qt-4.8/qsqlerror.html ) int number () const virtual void setNumber ( int number ) QString text () const void showMessage ( const QString & msg = QString::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 https://linux.die.net/man/3/qsqlerror 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 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
Public Member Functions | List of all members QSqlError Class Reference The QSqlError class provides SQL database error information. More... #include <qsqlerror.h> Public Types enum ErrorType { NoError, ConnectionError, StatementError, TransactionError, UnknownError } Public Member Functions http://cep.xray.aps.anl.gov/software/qt4-x11-4.8.6-browser/de/d66/class_q_sql_error.html QSqlError (const QString &driverText=QString(), const QString &databaseText=QString(), ErrorType type=NoError, int number=-1) QSqlError (const QSqlError &other) QSqlError &operator= (const QSqlError &other) ~QSqlError () QStringdriverText http://lists.mythtv.org/pipermail/mythtv-users/2007-August/190258.html () const voidsetDriverText (const QString &driverText) QStringdatabaseText () const voidsetDatabaseText (const QString &databaseText) ErrorTypetype () const voidsetType (ErrorType type) intnumber no error () const voidsetNumber (int number) QStringtext () const boolisValid () const Detailed Description The QSqlError class provides SQL database error information. QtSql 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 no error type all have setters so that you can create and return QSqlError objects from your own classes, for example from your own SQL drivers. See alsoQSqlDatabase::lastError(), QSqlQuery::lastError() Definition at line 53 of file qsqlerror.h. Member Enumeration Documentation enum QSqlError::ErrorType This enum type describes the context in which the error occurred, e.g., a connection error, a statement error, etc. NoError No error occurred. ConnectionError Connection error. StatementError SQL statement syntax error. TransactionError Transaction failed error. UnknownError Unknown error. None Connection Statement Transaction Unknown EnumeratorNoError ConnectionError StatementError TransactionError UnknownError Definition at line 56 of file qsqlerror.h. 56 { 57 NoError, 58 ConnectionError, 59 StatementError, 60 TransactionError, 61 UnknownError 62#ifdef QT3_SUPPORT 63 , None = NoError, 64 Connection = ConnectionError, 65 Statement = StatementError, 66 Transaction = TransactionError, 67 Unknown = UnknownError 68#endif 69 }; QSqlError::ConnectionErrorDefinition: qsqlerror.h:58 QSqlError::UnknownErrorDefinition: qsqlerror.h:61 QSqlError::TransactionErrorDefinition: qsqlerror.h:60 None#define NoneDefinition: qx11embed_x11.cpp:59 QSqlError::StatementErrorDefinition: qsqlerror.h:59 QSqlError::NoErrorDefinition: qsqlerror.h:57 Constructor & Destructor Documentation QSqlError::QSqlError ( const QString & driverText = QS
frontend database connection problems Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hello all, My current setup is: Debian Etch backend Mac Mini frontend running OS X PowerMac frontend running OS X Diskless frontend running Debian Etch Linux laptop running Debian Etch Spare box running Knoppmyth all running 0.20 downloaded from wwwmythtv.org's download page. The OS X packages were obtained from the snider pad. My problem is all of the Linux frontends, the OS X frontends works fine. I upgraded the server from Sarge to Etch without any problems and the OS X frontends worked fine. The diskless frontend that was running Debian Sarge failed to work after the server upgrade, I suspected a version mismatch between the SQL driver between the backend and the frontend. I decided to upgrade the diskless frontend to Debian Etch, and after a lot of problems, have gotten it to a working state, but MythTV fails to connect to the server. On starting, it spews a lot of "QSqlQuery::exec: database not open" errors and then show the setup wizard, which already has the correct values in - I compared it with the OS X frontends, they all match up exactly, and then I complete the wizard, it then exits with a final "QSqlQuery::exec: database not open". So I installed MythTV on my laptop, exactly the same problem. I decided to try Knoppmyth, it didn't work either. What am I doing wrong, and how do I fix it? Here's a snippet of the output from the diskless frontend: 2007-08-12 12:16:17.277 Using runtime prefix = /usr/local 2007-08-12 12:16:17.309 DPMS is active. 2007-08-12 12:16:17.319 New DB connection, total: 1 2007-08-12 12:16:17.320 Unable to connect to database! 2007-08-12 12:16:17.320 No error type from QSqlError? Strange... 2007-08-12 12:16:17.378 DB Error (KickDatabase): Query was: SELECT NULL; No error type from QSqlError? Strange... 2007-08-12 12:16:17.433 Unable to connect to database! 2007-08-12 12:16:17.434 No error type from QSqlError? Strange... 2007-08-12 12:16:17.488 DB Error (KickDatabase): Query was: SELECT NULL; No error type from QSqlError? Strange... 2007-08-12 12:16:17.544 Database not open while trying to load setting: GuiVidModeResolution 2007-08-12 12:16:17.545 Unable to conne