Hello. I am having a problem with one of my sites. It is an asp file that communicates with an access database for users to login to. For some reason every time I attempt to access it I get the general error 500. I have a system DSN in place that is setup correctly since other parts of the site are able to access it.
here is the code if it helps
Thanks - ANdy
//
<%@ Language=VBScript %>
<%
Response.Buffer=true
login = Request.Form("login"
pwd = Request.Form("pwd"
Set Conn = Server.CreateObject("ADODB.Connection"
Set MyRS = Server.CreateObject("ADODB.RecordSet"
MyConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("career_services_main.mdb"
Conn.Open MyConn
MySQL = "Select * from admin where admin_login = '" & login & "' AND admin_pwd = '" & pwd & "';"
set MyRS = Conn.Execute(MySQL)
if not myrs.EOF then
myRs.MoveFirst
Session("admin_name"
= MyRS("admin_name"
Session("logged_in"
= "true"
Response.Redirect("admin_home.asp"
else
Session("logged_in"
= "false"
Response.Redirect("login.asp?fail=true"
end if
%>
here is the code if it helps
Thanks - ANdy
//
<%@ Language=VBScript %>
<%
Response.Buffer=true
login = Request.Form("login"
pwd = Request.Form("pwd"
Set Conn = Server.CreateObject("ADODB.Connection"
Set MyRS = Server.CreateObject("ADODB.RecordSet"
MyConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("career_services_main.mdb"
Conn.Open MyConn
MySQL = "Select * from admin where admin_login = '" & login & "' AND admin_pwd = '" & pwd & "';"
set MyRS = Conn.Execute(MySQL)
if not myrs.EOF then
myRs.MoveFirst
Session("admin_name"
Session("logged_in"
Response.Redirect("admin_home.asp"
else
Session("logged_in"
Response.Redirect("login.asp?fail=true"
end if
%>