procedure TFormsfq.Button3Click(Sender: TObject);
var
dataseperate,strCondition :string;
begin
//根据查询的选项查找出相应的数据。
dataseperate='''' ;
strCondition := ' where 预约日期= '+ dataseperate+ datetostr(dtp.Date)+dataseperate ;
if trim(Cmbjcys.Text) <> '' then
strCondition := strCondition + ' and 检查医生 like ''%' + cmbJCYS.Text + '%' + '''';
if trim(cmbxm.Text) <> '' then
strCondition := strCondition + ' and 类别=''' + cmbxm.Text + '''';
if trim(editxm.Text) <> '' then
strCondition := strCondition + ' and 姓名 like ''%' + editxm.Text + '%' + '''';
with adodsall do
begin
adodsall.Active := false;
adodsall.CommandText := 'select * from 预约检查表 ' + strCondition;
adodsall.Active := true;
end;
end;