delphi~~~~ 用户密码错误编程
procedure check(db:string;account:string);
begin
with form1 do
begin
try
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select password from '+db+' where account='+''''+account+'''');
adoquery1.Open;
finally
showmessage('无此用户!');
aerror:=false;
end;
if edit2.Text=adoquery1.FieldByName('password').AsString then
pass:=true
else
if (edit2.Text<>adoquery1.FieldByName('password').AsString) and aerror then
application.messagebox('密码错误,如忘记密码请联系管理员!','密码错误!',mb_ok);
end;
end;
请问为什么有此account的时候,还显示“无此用户?”