[求助]VB登陆界面与后台SQL的连接检验
dim strSQL as Stringdim cn as new adodb.connection
dim rs as new adodb.recordset
cn.connectionstring=连接字符串
cn.open
cn.CursorLocation = adUseClient
strSQL ="select 密码 from 表 where 登录名='" & txtUserID.Text & "'"
rs.open strSQL,cn,adOpenStatic, adLockReadOnly
if rs.recordcount = 0 then
msgbox "用户名不正确"
else
if rs.fields[0].value = txtPwd.text then
msgbox "登录成功"
else
msgbox "密码错误"
end if
end if
这是一段VB登陆界面与后台SQL连接检验的一段代码。可是有好多地方看不懂,请高手帮忙解释一下!谢了!