string ls_username, ls_password
ls_username=trim(sle_1.text)
ls_password=trim(sle_2.text)
if ls_username="" or ls_password="" then
messagebox("提示","用户名和密码不能为空")
else
select user_id,user_pwd,user_des
into :gs_username,:gs_password,:gs_admin
from user
whereuser_id = :ls_usernameand
user_pwd = :ls_password ;
if SQLCA.sqlcode=0 then
open(w_main)
close(w_login)
else
li_n=li_n - 1
if li_n0 then
messagebox("提示","用户名或密码错误")
else
messagebox("提示","错误超过3次,自动退出")
halt
end if
end if
end if
|