Results 1 to 9 of 9

Thread: QMYSQL3: Unable to bind outvalues

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy QMYSQL3: Unable to bind outvalues

    XP Pro SP3
    QT 4.5.1
    MySQL 5.1.31
    Using MinGW (NOT MS Visual Studio)

    compiled MySQL plugin as described in
    http://www.jiggerjuice.net/software/qt-sql-drivers.html

    Everything works fine EXCEPT cannot get any query results. Always get...

    Using unsupported buffer type: 3 (parameter: 3) QMYSQL3: Unable to bind outvalues

    When I run the QT sqlbrowser demo it reports exactly the same problem. It does show the list of tables but any access to them, either by double-clicking on a table name or executing a query in the query window produces the above error.

    This has been tried on TWO different machines, both of which are CLEAN (e.g. install and patch XP, install Apache 2.2.11, MySQL 5.1.31, PHP 5.2.8, QT 4.5.1, make plugins as per page above and copy qsqlmysqld4.dll, libqsqlmysqld4.a to c:\qt\plugins\sqldrivers)

    I have searched and searched and have pretty much drawn a blank. Similar problems seem to have been fixed by changing mysql dll
    e.g.
    unsupported buffer type
    mysql library problem
    MySQL Strange behaviour

    I have PCTools firewall installed. I have disabled this. No difference.
    I have tried localhost and 127.0.0.1. No difference.
    Using mysql command line client works perfectly.
    Accessing database using PHP works perfectly

    Qt Code:
    1. QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
    2. db.setHostName("localhost");
    3. db.setDatabaseName(<valid database>);
    4. db.setUserName(<valid username>);
    5. db.setPassword(<valid password>);
    6. bool ok = db.open();
    7. if (ok)
    8. {
    9. // QSqlQuery query("select Event_Title from events where Event_ID=79");
    10. QSqlQuery query("select event_title,s.series_id,series_title from events,series s where event_id=79 and events.series_id=s.series_id");
    11. if (!query.isValid())
    12. {
    13. QMessageBox::information(this,"Last Error",query.lastError().text());
    14. // The more simple query gives no error but also produces no results
    15. // however QSqlError.errorNumber = -1
    16. }
    17.  
    18. while( query.next() )
    19. {
    20. // NEVER EVER get here!!!!
    21. // That is the problem in a nutshell!!!
    22. QString event_title = query.value(0).toString();
    23. QMessageBox::information(this,"event_title",event_title);
    24. }
    25. db.close();
    26. }
    To copy to clipboard, switch view to plain text mode 

    I have tried just about every combination, property, and method of QSqlDatabase, QSqlQuery, QSqlQueryModel, QSqlRecord, QSqlError, etc... all to no avail.

    The instance of the QSqlDatabase object seems to be connected ok. I can get a list of tables, etc. But that is all. And exactly the observed behaviour of the sqlbrowser demo as well.

    I have tried a large number of SQL queries, and checked each query in phpMyAdmin (OK) and in the cmd line mysql client (OK).

    I am a newbie to QT and think QT is awesome. But this is causing me some serious headache and heartache. Any suggestions or help gratefully received.

    Thanks
    Last edited by sirguyon; 9th May 2009 at 02:02.

Similar Threads

  1. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.