Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
4.7.0
-
None
-
Ubuntu 9.04, gcc 4.4.1, FreeTDS 0.63, Qt 4.7.0
Description
This simple program works OK with Qt 4.6.3 & fails in Qt 4.7.0
int main ( int argc, char *argv[] ) { QCoreApplication a(argc, argv); QSqlDatabase db = QSqlDatabase::addDatabase("QODBC"); db.setDatabaseName ( "DRIVER=FREETDS;SERVER=EPC;SERVERNAME=SQL-Spanish;DATABASE=CRCDAT"); db.setUserName("sa"); db.setPassword("*******"); if (db.open()) { qDebug ( "CONNECTION WORKED" ); QSqlQuery QRY; QRY.setForwardOnly(true); QRY.exec ( "SELECT TOP 10 * FROM SYSOBJECTS" ); if ( QRY.lastError().isValid() ) qDebug ( "Error executing SQL Query %s", qPrintable ( QRY.lastError().text() ) ); } else qDebug ( "CONNECTION FAIL" ); return 0; }
The output error is :
Error executing SQL Query [unixODBC][Driver Manager]Driver does not support this function QODBC3: QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
Obviously, I haven't changed anything in configuration, it's 4.6.3 to 4.7.0 change that causes the failure.
Perhaps some clue about ODBC driver compilation / configuration ? I've compiled it with DEFINES +=Q_ODBC_VERSION_2