<%
Dim adoCon 'Database Connection Variable
Dim strCon 'Holds the Database driver and the path and name of the database
Dim rsCheckUser 'Database Recordset Variable
Dim strAccessDB 'Holds the Access Database Name
Dim strSQL 'Database query sring
Dim strUserName 'Holds the user name
strUserName = Request.Form("txtUserName")
strAccessDB = "users"
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};uid=;pwd=letmein; DBQ=" & Server.MapPath(strAccessDB)
adoCon.Open strCon
Set rsCheckUser = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblUsers.Password FROM tblUsers WHERE tblUsers.UserID ='" & strUserName & "'"
rsCheckUser.Open strSQL, strCon
If NOT rsCheckUser.EOF Then
If (Request.Form("txtUserPass")) = rsCheckUser("Password") Then
Session("blnIsUserGood") = True
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
Response.Redirect"authorised_user_page.asp?name=" & strUserName
End If
End If
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckUser = Nothing
Session("blnIsUserGood") = False
Response.Redirect"unauthorised_user_page.htm"
%>
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x6d4 Thread 0x860 DBC 0x1f80064 Jet'.
/asp/check_user.asp, line 20
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Page:
POST 41 bytes to /asp/check_user.asp
POST Data:
txtUserName=asd&txtUserPass=&Submit=Enter
به نقل از KgbCia :سركاري كه نبود ؟!