Hello there,
I have a little problem with my query.
for(int i=0; i < dateList.length();i++)
{
buf = buf.left(10);
"set filed1= "+buf2+" "
"where partner in ('4569') "
"and Date= CONVERT (DATETIME,'"+buf+" 00:00:00',120) ",testdb);
bool test = insert1.exec();
if(test)
QMessageBox::information(this, tr
("query succesful"),tr
("test: %1").
arg(QString::number(dateList.
length())));
}
QSqlDatabase testdb= QSqlDatabase::database("testdb") ;
for(int i=0; i < dateList.length();i++)
{
QString buf = dateList.at(i);
buf = buf.left(10);
QString buf2 = contentList.at(i);
QSqlQuery insert1("update mytable"
"set filed1= "+buf2+" "
"where partner in ('4569') "
"and Date= CONVERT (DATETIME,'"+buf+" 00:00:00',120) ",testdb);
bool test = insert1.exec();
if(test)
QMessageBox::information(this, tr("query succesful"),tr("test: %1").arg(QString::number(dateList.length())));
}
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??
Bookmarks