with DM.DataQuery do
begin
close;
sql.Clear;
sql.Add('select * from data where jyqx>' +
MainForm.StatusBar1.Panels[1].Text);/这个的值为当前日期now
open;
end;
这样写法对吗??
谢谢liuxiaouo,现在测试正常的代码贴上,
with DM.DataQuery do
begin
close;
sql.Clear;
SQL.Text := 'select * from Data where jyqx <=atetimeParam';
Parameters.ParamValues['DatetimeParam'] := MainForm.StatusBar1.Panels[1].Text;
Open;
end;
//该段代码用是检测数据库中的日期是否超过当前日期