with adoquery1 do begin close; sql.clear; sql.text:='select * from table1 where udate=:date'; Parameters.parambyname(:date).value:=date; open; end;
to ziqing(紫情)我用的是adoquery不是adotable啊! 你的方法不行吧!!!
with adoquery1 do begin close; sql.clear; sql.text:='select * from table1 where udate=:date';Parameters.parambyname['date'].value:=date;open; end;这就是query应该没有问题的。date可以就是你的字段名。
Parameters.ParamValues['Pd']:=date;
and (DATEPART ( month , getdate() )= DATEPART (month ,[update]))
and (DATEPART ( day , getdate() )= DATEPART (day ,[update]))
我的意思是用adoquery控件,怎样查询当日的记录啊!getdate()报错的!!!!
begin
close;
sql.clear;
sql.text:='select * from table1 where udate=:date';
Parameters.parambyname(:date).value:=date;
open;
end;
你的方法不行吧!!!
begin
close;
sql.clear;
sql.text:='select * from table1 where udate=:date';Parameters.parambyname['date'].value:=date;open;
end;这就是query应该没有问题的。date可以就是你的字段名。