Receiving multiple result sets of return value in SQL server stored procedure from Qt (QSqlQuery)
Solved
General and Desktop
-
I'd look at
nextResult
which is likely the place that is going to load data from the query made. -
I'm not sure I'm following you on that one, can you clarify what you did ?
-
Sorry, I'm a bit late to the party. But http://doc.qt.io/qt-5/qsqlquery.html#nextResult is indeed, and always been, the way you move across multiple result sets (assuming your database supports them). Even in my non-Qt work with MS SQL Server this was how it worked there too.
-
So in the end, did you had to modify the driver for your stored procedure ?
-
So just looping with
QSqlQuery::next
got you the result of the stored procedure as expected ? -
@SGaist I did it this way for reading return params:
Query.nextResult(); // after reading table values //Get Return Parameter for (int i=0; i<CountReturnParam; i++) { qDebug() << QString("Returnparam %1 = %2") .arg(i).arg(Query.boundValue(i).toString()); }