with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add('select * from Communication where 性别=:tt');
Parameters[0].Value:=edit1.Text;
open;以上语句中"性别"能不能通过文本给,也就是说根据文本的变化而变化.
begin
close;
sql.Clear;
sql.Add('select * from Communication where 性别=:tt');
Parameters[0].Value:=edit1.Text;
open;以上语句中"性别"能不能通过文本给,也就是说根据文本的变化而变化.
with ADOQuery1 do
begin
close;
sql.Clear;
str:='select * from Communication where'+edit1.text+'=:tt'
sql.Add(str);
Parameters[0].Value:=edit1.Text;
open;
with ADOQuery1 do
begin
close;
sql.Clear;
str:='select * from Communication where'+edit2.text+'=:tt'
sql.Add(str);
Parameters[0].Value:=edit1.Text;
open;
//edit2.text为输入查找字段的。
with ADOQuery1 do
begin
close;
sql.Clear;
sql.Add('select * from Communication where '+edit2.Text+'=:tt');
Parameters[0].Value:=edit1.Text;
open;
end;