PB+SQL SERVER 2000 做一个登陆验证窗口
用PB+SQL SERVER 2000 做一个登陆验证窗口~
数据库连接没有问题~~
做的时候,在按纽登陆中添加了。。代码:
string pass_word,mangername
string username
mangername=trim(sle_1.text)
pass_word=trim(sle_2.text)
select uid
into :username
from t_userinfo
where uid =: mangername and upsw =: pass_word
using sqlca;
if try_time < 3 then
if sqlca.sqlcode=0 then
messagebox("登陆成功","欢迎管理员:")
w_main.visible=true
close(parent)
elseif sqlca.sqlcode=100 then
messagebox("警告","输入错误,请再输入一次!!",exclamation!)
sle_1.setfocus()
sle_1.text=''
sle_2.text=''
try_time++;
end if
else
messagebox("系统警告","您尝试登陆的次数超过三次,"+"系统将不允许你登陆(@_@)"+" ,请与管理员联系!!",stopsign!)
cb_1.enabled=false
end if
可是在运行时,总会不能严正通过!!!!
帮帮小弟~~