编程论坛---最好的编程学习论坛
打印

[求助]显示数据库所有的数据还是显示DRRQ的数据

[求助]显示数据库所有的数据还是显示DRRQ的数据

下面的程序当SWXB1.Checked then 是显示数据库所有的数据还是显示DRRQ的数据
其中XM和DRRQ、SWXB是数据库(DQQK)的字段
begin
hide;
QXKJYXGS.SHOW;
.......
if SWXB1.Checked then
begin
QXKJYXGS.ADOQuery2.SQL.Clear;


QXKJYXGS.ADOQuery2.SQL.Add('select * from DQQK where XM=:XM3 and DRRQ=RRQ3');
QXKJYXGS.ADOQuery2.Parameters.ParamByName('XM3').Value:=Trim(YHDR.qry1.FieldByName('XM').value);
QXKJYXGS.ADOQuery2.Parameters.ParamByName('DRRQ3').Value:=DateToStr(mytime);
QXKJYXGS.ADOQuery2.Active:=True;
if QXKJYXGS.ADOQuery2.RecordCount>0 then
begin
QXKJYXGS.ADOQuery2.Edit;
QXKJYXGS.ADOQuery2.FieldByName('SWXB').Value:=TimeToStr(DateTime);

QXKJYXGS.ADOQuery2.Post;
QXKJYXGS.ADOQuery2.SQL.Clear;
QXKJYXGS.ADOQuery2.SQL.Add('select * from DQQK where DRRQ=RRQ1');
QXKJYXGS.ADOQuery2.Parameters.ParamByName('DRRQ1').Value:=DateToStr(mytime5);
QXKJYXGS.ADOQuery2.Open;
end;
else
begin
......
......
......
end
end
.......
......


问题解决

TOP