这样需求的代码怎么写啊?
我想写段
密码连续三次错误输入
提示“密码连续错误三次 锁定账户” 并修改数据库的功能
但我写的这段怎么每次都是提示 “密码输入错误第一次啊”
哪位老大帮我改改 谢谢
string username,password
int count=0
select admin.username,admin.password
into :username,
:password
fromadmin
where admin.username= :sle_1.text;
if username =sle_1.text and password=sle_2.text then
open(w_main)
close(parent)
else
if count>=3 then
messagebox("error!","密码连续输入错误三次,账户被锁定,请联系管理员",exclamation!,ok!,2)
else
count++
messagebox("error","密码输入错误第"+string(count)+"次")
end if
end if
[解决办法]
将局部变量
int count=0
改成定义在“Declare Instance Variables”面板里的实例变量
即可