Hello,
I am trying to migrate from a windows 2000 to a windows 2008 webserver. I have an asp page that connects to my access db, not sure why it just gives me a 500 error
Here is what my script looks like
I appreciate the help
I am trying to migrate from a windows 2000 to a windows 2008 webserver. I have an asp page that connects to my access db, not sure why it just gives me a 500 error
Here is what my script looks like
Code:
<%
'Save the entered username and password
Username = Request.Form("txtUsername")
Password = Request.Form("txtPassword")
'Build connection with database
set conn = server.CreateObject ("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("..\..\..\mydb.mdb")
set rs = server.CreateObject ("ADODB.Recordset")
'Open record with entered username
rs.Open "SELECT * FROM mystuff where username='"& Username &"'", conn, 1
Response.Cookies("ValidUser") = Validated
'If there is no record with the entered username, close connection
'and go back to login with QueryString
If rs.recordcount = 0 then
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=namefailed")
end if
'If entered password is right, close connection and open mainpage
if rs("password") = Password then
Session("Username") = Username
Response.Redirect(RS("link"))
'If entered password is wrong, close connection
'and return to login with QueryString
else
rs.Close
conn.Close
set rs=nothing
set conn=nothing
Response.Redirect("login.asp?login=passfailed")
end if
%>
I appreciate the help