Hello

I have a question to ask hoping someone can help me ....

I access from my application to a Postgres database. I have to make a call to a function with parameters on the DB that returns two cursors and then display the data in a tableView. I will return errors and I wonder if QT with a call of this type is supported.
This is mycode:

Qt Code:
  1. QSqlQuery qdb1(db);
  2.  
  3. int iSr=0;
  4. QString stGeom,stImage,stVideo,stDateFrom,stDateTo;
  5.  
  6. iSr= ui->comboBoxSr->currentIndex();
  7. stGeom="";
  8. stImage="";
  9. stVideo="";
  10. stDateFrom="";
  11. stDateTo="";
  12.  
  13. // c1 and c2 are dbcursor
  14. qdb1.prepare("select * from f_get_data('c1', 'c2', ?, ?, ?, ?, ?, ?);fetch all in c1;fetch all in c2;");
  15.  
  16.  
  17. qdb1.bindValue(0, iSr);
  18. qdb1.bindValue(1, stGeom);
  19. qdb1.bindValue(2, stImage);
  20. qdb1.bindValue(3, stVideo);
  21. qdb1.bindValue(4, stDateFrom);
  22. qdb1.bindValue(5, stDateTo);
  23.  
  24.  
  25. qdb1.setForwardOnly(true);
  26. if(qdb1.exec()){
  27. model1->setQuery(qdb1);
  28.  
  29. ui->tableViewMissionPlan->setModel(model1);
  30. ui->tableViewMissionPlan->show();
  31.  
  32. }
To copy to clipboard, switch view to plain text mode 

Thank's a lot