| 发表于:2007-11-16 12:39:12 楼主 |
运行exe文件登录时出现这个问题,在别人电脑上就有这个问题。我的没有``是不是没有装vb (别人的代码。看不是很懂。麻烦帮我改下吧~~~~) private sub command1_click() '用来存放sql语句 dim txtsql as string '用来存放记录集对象 dim mrc as new adodb.recordset '用来存放返回信息 dim msgtext as string username = "" '判断输入用户名是否为空 if trim(text1.text = "") then msgbox "没有这个用户,请重新输入用户名!", vbokonly + vbexclamation, "警告" text1.setfocus else '查询指定用户名记录 txtsql = "select * from user_info where user_id='" & text1.text & "'" '执行查询语句 set mrc = EXECutesql(txtsql, msgtext) 'mrc.open if mrc.eof = true then msgbox "没有这个用户,请重新输入用户名!", vbokonly + vbexclamation, "警告" text1.setfocus else '判断输入密码是否正确 if trim(mrc.fields(1)) = trim(text2.text) then me.hide ok = true mrc.close username = trim(text1.text) frmmain.show else msgbox "输入密码不正确,请重新输入!", vbokonly + vbexclamation, "警告" text2.setfocus text2.text = "" end if end if end if '记载输入密码次数 micount = micount + 1 if micount = 3 then |
|
|
|
|