急需请教:数据库读取错误
读取有时可以有时不行,是什么原因?请教!!!
错误类型:
Provider (0x80004005)
未指定的错误
/password.asp, 第 7 行
有问题的代码如下:
<%
Function checkpassword( ID, Pwd )
Dim conn, SQLstr, rs
Set conn = Server.CreateObject("ADODB.Connection")
SQLstr = "driver={Microsoft Access Driver (*.mdb)};Pwd=ding"
conn.Open SQLstr & ";dbq=" & Server.MapPath("users.mdb")
sql = "Select * From users Where ID='" & ID & "' And Pwd = '" & Pwd & "'"
Set rs = conn.Execute( sql )
If rs.EOF Then
checkpassword = False
Else
checkpassword = True
End If
End Function
%>