这段程序的用户名和密码是什么?

来源:百度知道 编辑:UC知道 时间:2024/06/09 16:32:20
Private Sub cmdCancel_Click()
'设置全局变量为 false
'不提示失败的登录
LoginSucceeded = False
Me.Hide
End Sub

Private Sub cmdOK_Click()

Dim strPwd As String
Dim rsPwd As ADODB.Recordset
Dim strLogin As String

strLogin = Trim(txtUserName.Text)
strPwd = Trim(txtPassword.Text)

If Len(strLogin) = 0 Then
MsgBox "用户名不能为空,请输入用户名"
txtUserName.SetFocus
Exit Sub
End If

If Len(strPwd) = 0 Then
MsgBox "密码不能为空,请输入正确的密码"
txtPassword.SetFocus
Exit Sub
End If

Set rsPwd = gConn.Execute("SELECT pwd FROM tblUser WHERE login='" & Replace(strLogin, "'", "''") & "'")

If rsPwd.EOF Then
MsgBox "用户名不正确,请重新输入!"
ElseIf strPwd

这里就可以很明显的看出来啊
strLogin = Trim(txtUserName.Text)
strPwd = Trim(txtPassword.Text)
strLogin,strPwd是自定义的变量,分别表示程序中用到的用户名和密码。txtUserName.Text和txtPassword.Text就是传递进来的表单参数,分别是输入用户名和密码的input标签里的name值

你是说如何找值啊,那就得连数据库了,连接asp数据库的字符串网上有很多,找找就行,access和sql的都行,你要是需要的话,我可以给你发个