如题!谢谢!

解决方案 »

  1.   

    sql.text:='select * from table1 where udate=:pd';
    Parameters.ParamValues['Pd']:=date;
      

  2.   

    SELECT * FROM Table1 WHERE udate=GetDate()
      

  3.   

    select * from table1 where (DATEPART ( year , getdate() )= DATEPART ( year,[update]))
                                 and (DATEPART ( month , getdate() )= DATEPART (month ,[update]))
                               and (DATEPART ( day , getdate() )= DATEPART (day ,[update]))
      

  4.   

    老兄还是不行啊!
    我的意思是用adoquery控件,怎样查询当日的记录啊!getdate()报错的!!!!
      

  5.   

    with adoquery1 do
    begin
    close;
    sql.clear;
    sql.text:='select * from table1 where udate=:date';
    Parameters.parambyname(:date).value:=date;
    open;
    end;
      

  6.   

    to ziqing(紫情)我用的是adoquery不是adotable啊!
    你的方法不行吧!!!
      

  7.   

    with adoquery1 do
    begin
    close;
    sql.clear;
    sql.text:='select * from table1 where udate=:date';Parameters.parambyname['date'].value:=date;open;
    end;这就是query应该没有问题的。date可以就是你的字段名。