Maybe not relevant anymore)
I will write this for those who also stumbled upon this post.
I solved it in the following way.
Postgresql database
Version Qt6.4.1
query->exec("call test_procedure(1, 'p_rc'); FETCH ALL p_rc;");
if(query->lastError().isValid())
{
qDebug()<<query->lastError();
}
while (query->nextResult())
{
while (query->next()) {
qDebug()<<query->value(1);
}
}
QSqlQuery *query = new QSqlQuery(db);
query->exec("call test_procedure(1, 'p_rc'); FETCH ALL p_rc;");
if(query->lastError().isValid())
{
qDebug()<<query->lastError();
}
while (query->nextResult())
{
while (query->next()) {
qDebug()<<query->value(1);
}
}
To copy to clipboard, switch view to plain text mode
i am doing two consecutive requests
1. procedure call
2. reading the cursor.
and sequentially read the results of queries
while (query->nextResult())
while (query->nextResult())
To copy to clipboard, switch view to plain text mode
Bookmarks