为何总是说密码错误?(10分)

  • 主题发起人 newbirds
  • 开始时间
N

newbirds

Unregistered / Unconfirmed
GUEST, unregistred user!
以下代码有错吗,为什么总是说验证的密码有错呀??
if adot_user['passwd']=i_passwd.Text then
begin
form1.hide;
form2.show;
end
else
application.messagebox('no ok','密码错误',mb_ok);
end;
 
应该这样加上TRIM 去除多余的空格。即
if Trim(adot_user['passwd'])=Trim(i_passwd.Text) then ...
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
631
import
I
I
回复
0
查看
843
import
I
顶部