with qr do
begin
close;
sql.Clear;
sql.Add('select * from tpana where pdate>:Date');
paramByname('Date').AsDate:=StrtoDate('01-08-08');
open;
if eof then
showmessage('没有数据');
end;
使用变量吧,也许能解决问题
begin
close;
sql.Clear;
sql.Add('select * from tpana where pdate>:Date');
paramByname('Date').AsDate:=StrtoDate('01-08-08');
open;
if eof then
showmessage('没有数据');
end;
使用变量吧,也许能解决问题
begin
close;
sql.Clear;
sql.Add('select * from tpana where pdate>#01-08-08#');
// ~~~~~~~~不是年月日,可能是月日年//#2001-08-08#
open;
if eof then
showmessage('没有数据');
end;
with qr do
begin
close;
sql.Clear;
sql.Add('select * from tpana where pdate>''2001-08-08''');
open;
if eof then
showmessage('没有数据');
end;