query.exec("update weather103 set distance=strUpDistance where id=iUpdateId");
strUpDistance是之前定义的字符串,运行程序时,给它赋予了值;
iUpdateId是之前定义的整型,运行程序时,给它赋予了值;
运行这行代码无效,但是运行下面这行程序时,
query.exec("update weather103 set distance=‘hhh' where id=3");
有效;
定义一个字符串strUpDistance和整形iUpdateId的形式该怎么办啊?
也就是说把变量strUpDistance、iUpdateId代替常量‘hhh'、3