登录代码问题 求助
非常郁闷! 请各位高手帮忙运行下列代码时时老是提示"密码错误"
string ls_uname,ls_pwd1,ls_pwd2,ls_sno,ls_s1
ls_uname=sle_uname.text
ls_pwd1=sle_pwd.text
select sno
into :ls_sno
from t_student
where t_student.sno=:ls_uname;
if sle_uname.text="" or sle_pwd.text="" then
messagebox("提示","用户名或密码不能为空,请输入用户名或密码!")
sle_uname.text=""
sle_pwd.text=""
return
end if
select password
into :ls_pwd2
from t_student
where t_student.sno = :ls_uname ;
if ls_pwd1 =ls_pwd2 then
open(w_main)
else
messagebox("错误","用户名或密码错误,请重新输入!")
sle_pwd.text=""
return
end if