| 发表于:2008-02-16 13:56:57 楼主 |
原程序代码是这样: public username as string public adocon as adodb.connection public rsado as adodb.recordset public userdept as string private function verifyuer() as boolean on error goto errorhandler dim strsql as string strsql = "select * from user " strsql = strsql & "where userid='" & text1(1).text & "' and userpwd='" & text1(2).text & "'" rsado.open strsql, adocon, adopenstatic, adlockreadonly if rsado.eof then msgbox "用户名或密码错误,请重新输入!", vbcritical, "用户登陆" text1(1).setfocus exit function end if userdept = rsado("deptuserin") username = rsado("truename") verifyuser = true exit function errorhandler: msgbox "验证用户信息出错!" & err.description, vbcritical, "出错信息" exit function end function 最后调试的时候提示的是“user”附近有语法错误。是不是我的rsado.open那儿写的不对啊?还是那儿出错了,急用哦,在线等候 |
|
|
|
|