Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt5.1/QSqlQuery call MySQL 5.5 stordproc(PROCEDURE), can't get a dataset ???



  • CREATE DEFINER=myDBs@localhostPROCEDUREtestSelect`()
    BEGIN
    SELECT *
    FROM myTable;
    END
    -- 4 records in myTable;

    but:
    QSqlQuery query(myDatabase);
    if ( query.prepare("call testSelect()") )
    {
    if ( query.exec() )
    {
    if ( query.isSelect() )
    {
    }else
    {
    // run to here ??? why ?
    }
    if ( query.next() )
    {
    }else
    {
    // run to here ??? why ?
    }
    }
    }

    This is code for MS SQL Server2008 is OK !!!

    QSqlQuery not for MySQL5.5 on Ubuntu12.04 ??? ???



  • Hi have you found a solution ?
    It seems that no one is answering this question over the forums.


Log in to reply