Hi!

Me again with my database based problems.
I have opened two databases in order to transfer data from one database to another. I declare first query as:
Qt Code:
  1. QSqlQuery query_read("SELECT * FROM groups", db1);
  2. int is_kat = query_read.record().indexOf("group");
  3. while(query_read.next()) {
  4. QString s_kat = query_read.value(is_kat).toString();
  5. //some code + declaration for another query
  6. }
To copy to clipboard, switch view to plain text mode 
The second query is declared inside the marked area like this:
Qt Code:
  1. QSqlQuery query_write(db2);
  2. query_write.prepare("INSERT INTO kat (kategories) VALUES (:kategorie)");
  3. query_write.bindValue(":kategorija", s_kat);
  4. query_write.exec();
To copy to clipboard, switch view to plain text mode 
Compiling does not return any error, but the data is not transfered. Where is the error?

Regards,
Luka