当前位置: 代码迷 >> PB >> 这样需求的代码如何写啊
  详细解决方案

这样需求的代码如何写啊

热度:26   发布时间:2016-04-29 08:28:19.0
这样需求的代码怎么写啊?
我想写段 
密码连续三次错误输入 
提示“密码连续错误三次 锁定账户” 并修改数据库的功能

但我写的这段怎么每次都是提示 “密码输入错误第一次啊”

哪位老大帮我改改 谢谢



string username,password
int count=0

select admin.username,admin.password
into :username,
:password
from admin
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”面板里的实例变量
即可

  相关解决方案