- UID
- 294809
- 帖子
- 734
- 精华
- 0
- 威望
- 2
- 阅读权限
- 100
- 注册时间
- 2005-6-21

|
说不清楚
Private Sub cmdOK_Click()
Dim mrc As ADODB.Recordset
Dim strmsg As String
txtSQL = "select uid from userinfo where UID='" & Trim(txtUserName.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, strmsg)
If mrc.EOF = True Then
MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
txtUserName.SetFocus
txtUserName.SelStart = 0
txtUserName.SelLength = Len(txtUserName.Text)
Exit Sub
End If
UserName = mrc.Fields(0)
txtSQL = "select UID from userinfo where PWD='" & Trim(txtPassword.Text) & "'"
Set mrc = ExecuteSQL(txtSQL, strmsg)
If mrc.EOF = True Then
MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
txtPassword.SetFocus
txtPassword.SelStart = 0
txtPassword.SelLength = Len(txtPassword.Text)
Exit Sub
End If
OK = True
frmMain.Show
Unload Me
End Sub
提示这个有问题。。 |
|