目录
一 问题解决

二 错误提示
            //下面两句错误提示:原因是GreenLightCurve = '%2'后面少写逗号
 //            SQL exec error :  "UPDATE TestingCurve SET RedLightCurve = '30000.00', GreenLightCurve = '31000.00' YellowLightCurve = '32000.00', BlueLightCurve = '33000.00' WHERE HoleID = 2"
 //            SQL error :  "No query"
三 正确写法
//正确写法
            strSql = QObject::tr("UPDATE TestingCurve SET RedLightCurve = '%1', GreenLightCurve = '%2', "
                                 "YellowLightCurve = '%3', BlueLightCurve = '%4' "
                                 "WHERE HoleID = %5")
                    .arg(strRedLightCurve)
                    .arg(strGreenLightCurve)
                    .arg(strYellowLightCurve)
                    .arg(strBlueLightCurve)
                    .arg(i); 
四 更多参考
QT数据库开发Unable to fetch row错误和No query错误 (wisestudy.cn)
http://www.wisestudy.cn/opentech/Unable_to_fetch_row.html










