rs.open 错误13
Private Sub cmd1_Click()Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strsql As String
Dim uname As String
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db4.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLE DB:"
uname = Trim(txt1.Text)
upwd = Trim(txt2.Text)
If uname = "" Or upwd = "" Then
MsgBox "对不起,用户、密码不能为空!请重新输入!!"
strsql = "select * from db4 where 用户名= '" & uname & " 'and 用户口令 = '" & upwd & "'"
rs.Open strsql, conn, adOpenKeyset, adLockPessimistic
If rs.EOF = True Then
MsgBox "对不起!无此用户或者密码不正确!请重新输入!!"
txt1.Text = ""
txt2.Text = ""
txt1.SetFocus
rs.Close
End If
Else
Form2.Show
Unload Me
End If
End Sub
求高手解决啊,,,,,,,,,,,,,,,,,,,,,,