Hello there,

I have a little problem with my query.
Qt Code:
  1. QSqlDatabase testdb= QSqlDatabase::database("testdb") ;
  2. for(int i=0; i < dateList.length();i++)
  3. {
  4. QString buf = dateList.at(i);
  5. buf = buf.left(10);
  6. QString buf2 = contentList.at(i);
  7. QSqlQuery insert1("update mytable"
  8. "set filed1= "+buf2+" "
  9. "where partner in ('4569') "
  10. "and Date= CONVERT (DATETIME,'"+buf+" 00:00:00',120) ",testdb);
  11. bool test = insert1.exec();
  12. if(test)
  13. QMessageBox::information(this, tr("query succesful"),tr("test: %1").arg(QString::number(dateList.length())));
  14. }
To copy to clipboard, switch view to plain text mode 

this query have no effect on my db it changes no fileds why??

Have anybody some idea??