请问这句话又什么错误吗?
vb吧
全部回复
仅看楼主
level 5
DanieSimth 楼主
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
2008年08月07日 07点08分 1
level 0
Dim mrc As ADODB.Recordset 改成Dim mrc As new ADODB.Recordset
2008年08月07日 07点08分 2
level 5
DanieSimth 楼主
不,上面说这句有错!If mrc.EOF = True Then
2008年08月07日 08点08分 3
1