with adoquery1 do
begin
close;
sql.clear;
strsql:='select student_id,student_name,';
strsql2:=' from '+tbnm; // tbnm是一个变量的表名
strsql3:=' where '+ys+fh; // fh是一个符号( > < =)
sql.Add(strsql+ys); //ys是一个变量字段
sql.Add(strsql2);
sql.Add(strsql3+inttostr(sc2));
open;
end
为什么我这段语句出现错误??很迷茫!请高手帮帮菜鸟!
begin
close;
sql.clear;
strsql:='select student_id,student_name,';
strsql2:=' from '+tbnm; // tbnm是一个变量的表名
strsql3:=' where '+ys+fh; // fh是一个符号( > < =)
sql.Add(strsql+ys); //ys是一个变量字段
sql.Add(strsql2);
sql.Add(strsql3+inttostr(sc2));
open;
end
为什么我这段语句出现错误??很迷茫!请高手帮帮菜鸟!
sql.Add(strsql3+''''+inttostr(sc2)+'''');
strsql:='select student_id,student_name';