if radiobutton4.checked then adoquery1.SQL.add('select 题型,难度,题干,答案 from 邮件列表 where 题型=);
adoquery1.active:=true;
这里“程序题”是个字符串
不加引号不能运行.但是加上引号后add里的那个字符串就出错了.
请问这是为什么~~~~
adoquery1.active:=true;
这里“程序题”是个字符串
不加引号不能运行.但是加上引号后add里的那个字符串就出错了.
请问这是为什么~~~~
2, 在SQL 语句里的" 题型 = " 条件不全;
begin
adoquery1.SQL.add('select 题型,难度,题干,答案 from 邮件列表 where 题型=');
adoquery1.SQL.add('''程序题''');
adoquery1.active:=true;
end;
begin
adoquery1.SQL.add('select 题型,难度,题干,答案 from 邮件列表 where 题型=');
adoquery1.sql.add(''''+'程序题'+'''');
open;
end;
begin
adoquery1.SQL.add('select 题型,难度,题干,答案 from 邮件列表 where 题型=:a');
adoquery1.Parameters.parambyname('a').value := '程序题';
.
.
.
.
end;
adoquery1.active:=true;