implementation
{$R *.DFM}
procedure Tjinricxfrm.FormShow(Sender: TObject);
var
riqistr:string;
sql:string;
n:integer;
begin
shortdateFormat:='YYYY.MM.DD'; //确定日期格式
LongDateFormat:='YYYY.MM.DD';
DateSeparator:='-';
riqistr:=datetostr(date); //当前日期
paiche:=Tpaichein.create;
//sql:='delete from DATETIME_RECORD '+'insert DATETIME_RECORD ';
//sql:='select * from WORK_INFO where DATETIME Like '+''''+'%'+ riqistr+'%'+'''';
//paiche.Execu(sql);
sql:='select * from WORK_INFO where DATETIME Like '+''''+'%'+ riqistr+'%'+'''';
n:=paiche.Find(sql);
clientdataset1.Data:=paiche.Sel(sql); //显示当日的派车记录情况
if n<>0 then
StatusBar1.Panels[0].Text :='今日派车记录有 ' + inttostr(n) +'条。'
else
StatusBar1.Panels[0].Text :='今日尚无派车记录。';
end;
procedure Tjinricxfrm.BitBtn2Click(Sender: TObject);
begin //退出查询
close;
// paiche.Free;
end;
end.