我的程序:
procedure TForm1.Button1Click(Sender: TObject);
begin
with ADOquery1 do
begin
Close;
sql.clear;
sql.add('select * from E202_1Mtbl where Rptdate = :lsrptdate');
parameters.ParamByName('lsrptdate').DataType := ftstring;
Parameters.ParamByName('lsrptdate').Value := '2001.03';
Open;
showmessage(FieldByName('CorpCode').AsString);
end;
end;
paramcheck设为true;