[Bug 253952] [NEW] SELECT don't work in libqt4-sql-odbc with IBM ISeries driver

Mondin Marco mondin.marco at mondinnet.com
Fri Aug 1 12:55:59 UTC 2008


Public bug reported:

Binary package hint: libqt4-sql-odbc

I tested whit ISeriesAccess ODBC driver for linux 1.4 and 1.6 both 32bit.
Whit QT4.2 compiled myself worked, but they used unixODBC and not iODBC.

qDebug show regulary connection to database, but when I tray to do a
SELECT, the result of debug is :

Query active :  true QSqlError(-1, "", "")
Is Select :  true QSqlError(-1, "", "")

And after query.exec() and query.next()
QSqlError(0, "QODBC3: Unable to fetch first", "  [iODBC][Driver Manager]Optional feature not implemented")

If I tray the same query in iodbctest it worked.

marco at marco-desktop:~/src/g-suite-std-qt4/orfor$ iodbctest "DSN=GAD"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0607.1008
Driver: 05.04.0070 (libcwbodbc.so)

SQL>SELECT NRORD FROM TEORF00F WHERE NRORD=800300

NRORD
---------
800300

 result set 1 returned 1 rows.


Code in C++ is:

      db.setDatabaseName("GAD");
      if(db.open())
      {
         QSqlQuery query(db);
         query.prepare("SELECT NRORD FROM TEORF00F WHERE NRORD=:i1");
         query.bindValue(":i1",numero);
         query.exec();
	 qDebug() << "Query active : " << query.isActive() << query.lastError();
	 qDebug() << "Is Select : " << query.isSelect() << query.lastError();
         if(query.next())
	 {
	    qDebug() << query.lastError();
            nrord=query.value(0).toInt();
	    qDebug() << "I'am on a record : " << nrord << query.lastError();
	 }
         qDebug() << query.lastError();
         if(num.toInt()==nrord)
            attivo=true;
      }

** Affects: qt4-x11 (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  Binary package hint: libqt4-sql-odbc
+ 
+ I tested whit ISeriesAccess ODBC driver for linux 1.4 and 1.6 both 32bit.
+ Whit QT4.2 compiled myself worked, but they used unixODBC and not iODBC.
  
  qDebug show regulary connection to database, but when I tray to do a
  SELECT, the result of debug is :
  
  Query active :  true QSqlError(-1, "", "")
  Is Select :  true QSqlError(-1, "", "")
  
  And after query.exec() and query.next()
  QSqlError(0, "QODBC3: Unable to fetch first", "  [iODBC][Driver Manager]Optional feature not implemented")
  
  If I tray the same query in iodbctest it worked.
  
  marco at marco-desktop:~/src/g-suite-std-qt4/orfor$ iodbctest "DSN=GAD"
  iODBC Demonstration program
  This program shows an interactive SQL processor
  Driver Manager: 03.52.0607.1008
  Driver: 05.04.0070 (libcwbodbc.so)
  
  SQL>SELECT NRORD FROM TEORF00F WHERE NRORD=800300
  
  NRORD
  ---------
  800300
  
   result set 1 returned 1 rows.
  
  
  Code in C++ is:
  
        db.setDatabaseName("GAD");
        if(db.open())
        {
           QSqlQuery query(db);
           query.prepare("SELECT NRORD FROM TEORF00F WHERE NRORD=:i1");
           query.bindValue(":i1",numero);
           query.exec();
  	 qDebug() << "Query active : " << query.isActive() << query.lastError();
  	 qDebug() << "Is Select : " << query.isSelect() << query.lastError();
           if(query.next())
  	 {
  	    qDebug() << query.lastError();
              nrord=query.value(0).toInt();
  	    qDebug() << "I'am on a record : " << nrord << query.lastError();
  	 }
           qDebug() << query.lastError();
           if(num.toInt()==nrord)
              attivo=true;
        }

-- 
SELECT don't work in libqt4-sql-odbc with IBM ISeries driver
https://bugs.launchpad.net/bugs/253952
You received this bug notification because you are a member of Kubuntu
Team, which is subscribed to qt4-x11 in ubuntu.




More information about the kubuntu-bugs mailing list