Project CompetitionServer.exe引发异常类ESQLiteException,并显示消息'执行SQL时出错。 错误[1]:SQL错误或缺少数据库。 “INSERT INTO MatchesTable(MatchesID,RoundID,AkaFirstName,AoFirstName)VALUES(1,2,p,o)”:no such column:p'。 进程停止。 使用“步骤”或“运行”继续。
是的,p不是一列,而是我试图插入的数据。 我该如何解决这个问题?
Project CompetitionServer.exe raised exception class ESQLiteException with message 'Error executing SQL. Error [1]: SQL error or missing database. "INSERT INTO MatchesTable(MatchesID,RoundID,AkaFirstName,AoFirstName)VALUES(1,2,p,o)": no such column: p'. Process stopped. Use Step or Run to continue.
Yes, p is NOT a column, it is the data I am trying to insert. How can I fix this problem?
最满意答案
在SQL中,作为数据的字符串常量必须用引号引起来。 否则,字符串被解释为关键字,表名或列名,这就是发生在这里的情况。 用'p'代替普通的p。
In SQL, string constants that are data must be enclosed in quotes. Otherwise the string is interpreted as a keyword, table name, or column name, which is what's happening here. Use 'p' instead of plain p.
更多推荐
发布评论