编程遇到点问题,求大神指教!!
Private Function checkuser() As BooleanDim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.cursortype = adopenkeyset
rs.locktype = adLockOptimistic
sqlconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\yyjxc.mdb"
rs.Open "Select * from [user] where name = '" & Trim(suser) & "'and password='" & Trim(spassword) & "'", sqlconnection
If rs.RecordCount = 1 Then
checkuser = True
Else
checkuser = False
End If
End Function
上面代码运行后,无论正确与否,rs.RecordCount 的返回值总不是1,求好心人指教!