写关键部分function Login(UID,PWD,cnStr:PChar):integer;stdcall;
var
  Ado1:TADODataSet;
begin
  Ado1:=TADODataSet.Create(Application);
  ……
  ……
  Ado1.commandtext:='select * from MyTable where UID='''+StrPas(UID)+''' and PWD='''+StrPas(PWD)+'';
  Ado1.active:=true;//开始出错??
  if not Ado1.eof then
   ……
end