【发布时间】:2018-08-09 12:08:51
【问题描述】:
我第一次在 QT 5.6.0 版本中为数据库模块编写代码,但我在下面的行中遇到错误,我不知道如何解决该问题
代码行:
QString insertTable=QString("INSERT INTO %1(%2,%3)" "VALUES (%4,%5)".arg(tableName).arg("\'schema\'","\'timestamp\'").arg(schema,timestamp));
错误是:
C:\Users\ankit.ahlawat\Desktop\Infosys\git\IoTGateway_Database\database.cpp:212: error: request for member 'arg' in '"INSERT INTO %1(%2,%3)VALUES (%4,%5)"', which is of non-class type 'const char [36]'
"VALUES (%4,%5)".arg(tableName).arg("\'schema\'","\'timestamp\'").arg(schema,timestamp));
^
【问题讨论】:
-
在没有格式化的情况下很难看到发生了什么。我什至不确定那里有代码。
-
我很抱歉,现在我编辑了那个问题
标签: c++ database qt postgresql-9.4