SQL参数问题,高手指教
出现了另一个错误:"至少有一个参数没有值",可我看不出那里有问题,麻烦给我再看看,在线等答案:
with dm.adoq1 do
begin
close;
sql.Clear;
sql.add('select * from table0cpin where datepart(yy,indate)=:yr');
parameters.ParamByName('yr').value:=edit7.Text;
sql;
open;
first;
if eof and bof then showmessage('ok!总数是:'+inttostr(RecordCount));
end;