真tm坑.
QString execStr = QString("SELECT * FROM [Log] WHERE [username]=\"yyy\" ");
查询项用双引号在ACCESS里通过,在其他数据库如SQlite能通过,在代码里就报错[标题],
解决:改为单引号
QString execStr = QString("SELECT * FROM [Log] WHERE [username]='yyy'");
2023-08-07 16:20:40
真tm坑.
QString execStr = QString("SELECT * FROM [Log] WHERE [username]=\"yyy\" ");
查询项用双引号在ACCESS里通过,在其他数据库如SQlite能通过,在代码里就报错[标题],
解决:改为单引号
QString execStr = QString("SELECT * FROM [Log] WHERE [username]='yyy'");