登陆问题!总是不正确!
xhwy2 2006-06-07 11:02:39 我的“确定”按钮代码如下:
string correct_pswd ,g_pswd
integer g_input_time=0
g_input_time=g_input_time+1
g_pswd=sle_2.text
if sle_1.text=''or sle_2.text='' then
messagebox("警告","请输入用户名和密码!")
else
select x_pswd into:correct_pswd from user_password where x_user='sle_1.text';
if g_pswd=correct_pswd then
open(w_main)
close(w_password)
else
if g_input_time>=3 then
messagebox("警告","你无权进入!")
close(w_password)
else
messagebox("警告","你输入口令有错误,请重新输入!")
end if
end if
end if
描述:1:在工程里已同数据库连通
‘// Profile stumanager
SQLCA.DBMS = "MSS Microsoft SQL Server"
SQLCA.Database = "stumanager"
SQLCA.ServerName = "XH"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""
open(w_password)’
运行的问题:1:总显示“你输入口令有错误,请重新输入”,不能正确登陆。
2:无论登陆好多次,都不显示“你无权进入”,说明这段代码没有起作用。
请问是啥原因,谢谢!