[Qt-interest] Qt4, ODBC, Informix IDS11
a78o
a78o at mail.ru
Mon Sep 28 14:37:09 CEST 2009
Dear Bill,
Thank you for your answer.
I've got the following last error message after first query.next() call.
<output>
" [Informix][Informix ODBC Driver]Fetch type out of range. QODBC3: Unable to fetch first"
</output>
Could you advice something?
-----Original Message-----
From: Bill King <bill.king at nokia.com>
To: First Last <a78o at mail.ru>
Date: Mon, 28 Sep 2009 09:24:46 +1000
Subject: Re: [Qt-interest] Qt4, ODBC, Informix IDS11
> That's all fine. Looks like the informix driver doesn't return a size of
> the dataset (that's informix's fault, and not qt odbc's fault). Also,
> isValid will not be true until you do your first next() call, until it
> hits the end of the dataset. As to why query.next is not working, I have
> no idea, maybe query.lastError() will tell you.
>
>
> On 09/25/2009 11:03 PM, ext First Last wrote:
> > Dear all,
> >
> > I'm trying to run following code:
> > <code>
> > QSqlDatabase db = QSqlDatabase::addDatabase("QODBC3"); // also tried to use QODBC
> > db.setDatabaseName("odbcxxx");
> > qDebug() << "db.open: " << db.open();
> >
> > QSqlQuery query;
> > qDebug() << "query.exec: " << query.exec("select * from tablexxxxx");
> >
> > qDebug() << "query.size: " << query.size();
> > qDebug() << "query.isActive: " << query.isActive();
> > qDebug() << "query.isValid: " << query.isValid();
> >
> > while (query.next()) {
> > QString field = query.value(0).toString();
> > qDebug() << field;
> > }
> > </code>
> >
> > and get the following output:
> > <output>
> > db.open: true
> > query.exec: true
> > query.size: -1
> > query.isActive: true
> > query.isValid: false
> > </output>
> >
> > Control Panel -> Administrative Tools -> Data Sources (ODBC), Data source defined as following:
> > Name: odbcxxx
> > Driver: IBM INFORMIX ODBC DRIVER ver. 2.90.00.12497 (also tried to use IBM INFORMIX 3.82 32 BIT driver ver. 3.82.00.11811)
> > Server, Host, Protocol, etc... is set to correct values because I use another utility that use the same data source and works correctly.
> >
> > Table tablexxxxx exists and has about 5 rows.
> >
> > DB: IBM Informix Dynamic Server Version 11.10.UC1, RHEL5
> > Qt: 4.5.1, Windows XP SP2
> >
> > Could somebody advice what is the problem?
> > Thank in advance
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
>
>
> --
> Bill King, Software Engineer
> Qt Development Frameworks, Nokia Pty Ltd
> Brisbane Office
>
More information about the Qt-interest-old
mailing list