I am trying to download all rows from a mysql table into sqlite using QNetworkAccessManager but it will not retrieve full data, more worse it retrieves random number of rows(134,135,220, 1409) but never full rows which in that tables are aprox. 4000;

Url setting:
Qt Code:
  1. void sinc::startNetworkRequest(){
  2. QNetworkAccessManager *manager=new QNetworkAccessManager(this);
  3. QNetworkRequest cerere;
  4. QNetworkReply *rasp;
  5.  
  6. cerere.setUrl(QUrl("http://webserverurl.php?param1=01&param2=01"));
  7. rasp=manager->get(cerere);
  8. connect(rasp,SIGNAL(readyRead()),this,SLOT(insertToTable()));
  9. connect(rasp,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(slotEroare(QNetworkReply::NetworkError)));
  10. }
To copy to clipboard, switch view to plain text mode 

Data retrieving slot:

Qt Code:
  1. void sinc::insertToTable(){
  2. QByteArray baRasp=rasp->readAll();
  3. QString str(baRasp);
  4. QStringList listaDet,listaElemR;
  5. listaDet=str.split(";");
  6. QSqlQuery curatare,adaug;
  7.  
  8. curatare.exec("delete from destTable");
  9. for(int i=0; i<listaDet.size()-1; i++){
  10. listaElemR=listaDet[i].split(",");
  11. adaug.exec("insert into destTable values ("
  12. "'"+listaElemR[0]+"'"
  13. ",'"+listaElemR[1]+"'"
  14. ",'"+listaElemR[2]+"'"
  15. ",'"+listaElemR[3]+"'"
  16. ",'"+listaElemR[4]+"'"
  17. ",'"+listaElemR[5]+"'"
  18. ",'"+listaElemR[6]+"'"
  19. ",'"+listaElemR[7]+"'"
  20. ",'"+listaElemR[8]+"'"
  21. ",'"+listaElemR[9]+"'"
  22. ",'"+listaElemR[10]+"'"
  23. ",'"+listaElemR[11]+"'"
  24. ",'"+listaElemR[12]+"'"
  25. ",'"+listaElemR[13]+"'"
  26. ",'"+listaElemR[14]+"'"
  27. ")");
  28. }
  29. }
To copy to clipboard, switch view to plain text mode 

If I want to retrieve the number of rows from the webserver( through echo mysqli_num_rows(result)) I get the full number rows, so it isn't mysql's,php's or webserver's fault.