菜鸟求救:制作登录窗口出现问题
建了一个lginfor的表,其中lgname是key
输入了下列数据:
lgname lgpaword
newfireflying 20044200
lazycat 20044343
类型都是char
在pb上建了界面
有:
用户框:
口令框:
按纽有:
确定:
退出:
其中按纽"确定"代码如下:
setpointer(HourGlass!);
string opid
string password
opid=sle_2.text; //用户框的name
select lgpaword
into :password
from lginfor
where lgname=:opid ;
if(sle_1.text=password) then //口令框的name
open(main_stu)
else
messagebox("系统提示","密码错误")
return
end if
当我输入用户:newfirefying
口令:20044200
居然是:系统提示,密码错误
PS:数据库的连接是没问题的
而且调式发现sle_1.text=20044200
password=20044200
但为什么运行结果不正确呢?