[email protected]
[Top] [All Lists]

Re: QSqlQuery problem

Subject: Re: QSqlQuery problem
From: Anders Larsen
Date: Wed, 28 Nov 2007 09:27:14 +0100
Linos wrote:
Linos escribió:
Hello Anders,
        prepare() prints True, exec() print True, next() print False, 
query.lastError().isValid() after failed next()
prints False and query.lastError().text() is empty.

Miguel Angel.

Anders Larsen escribió:
Linos wrote:


anyone knows why or how i can debug this problem?

Check whether prepare(), exec() and next() return true or false. If
false is returned then check what query.lastError() returns.

Anders L.

It sounds like i should fill a bug report with this, no?

The calls to prepare() and exec() returns true which means that the query is syntactically correct and that no problems occurred when binding the parameter or executing the query. The call to next() returns false, but no error is set, which means that there are no rows in the result. Since the query returns rows when you execute it directly this seems a bit odd. Can you double check the query you prepare and the value you bind? Also, try to turn on logging in the ODBC driver and see if warnings or errors are being logged. If that doesn't help report it as a bug.

Anders L.

To unsubscribe - send a mail to [email protected] with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>