我在SQLiteDatabase中遇到语法错误。
这是我创建表格的脚本:
CREATE TABLE `plan` (
refPlan TEXT PRIMARY KEY NOT NULL,
label TEXT NOT NULL,
dateCreation date NOT NULL,
dateModification date NOT NULL,
refProjet TEXT NOT NULL,
typeCouverture TEXT NOT NULL,
id_coupe int NOT NULL,
typePlancher TEXT NOT NULL,
nomGamme TEXT NOT NULL,
FOREIGN KEY (refProjet) REFERENCES projet,
FOREIGN KEY (typeCouverture) REFERENCES couverture,
FOREIGN KEY (id_coupe) REFERENCES coupePrincipe,
FOREIGN KEY (typePlancher) REFERENCES plancher,
FOREIGN KEY (nomGamme) REFERENCES gamme
);
这是我的要求:
SQLQuery = "SELECT * FROM `plan` WHERE refProjet = 'PRO001'";
而且,错误:
SQLite error (1): near "=": syntax error
Une exception de première chance de type 'System.Data.SQLite.SQLiteException' s'est produite dans System.Data.SQLite.dll
有人可以帮助我吗?
答案 0 :(得分:0)
在双引号
中使用此命令SQLQuery = "SELECT * FROM [plan] WHERE refProjet = 'PRO001'";