Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

internal server error / ASP problem?

Status
Not open for further replies.

nacho38

IS-IT--Management
Dec 16, 2002
34
US
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(&quot;login&quot;)
pwd = Request.Form(&quot;pwd&quot;)

Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set MyRS = Server.CreateObject(&quot;ADODB.RecordSet&quot;)

MyConn = &quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot; & Server.MapPath(&quot;career_services_main.mdb&quot;)
Conn.Open MyConn
MySQL = &quot;Select * from admin where admin_login = '&quot; & login & &quot;' AND admin_pwd = '&quot; & pwd & &quot;';&quot;

set MyRS = Conn.Execute(MySQL)

if not myrs.EOF then
myRs.MoveFirst
Session(&quot;admin_name&quot;) = MyRS(&quot;admin_name&quot;)
Session(&quot;logged_in&quot;) = &quot;true&quot;
Response.Redirect(&quot;admin_home.asp&quot;)
else
Session(&quot;logged_in&quot;) = &quot;false&quot;
Response.Redirect(&quot;login.asp?fail=true&quot;)
end if
%>

 
try unchecking &quot;show friendly errors&quot; in the advanced tab of tools.

This will show you what is wrong with the code in reality other then a 500 error.

one thing: you are using a DSN-Less connection but you reference a DSN setup ????

two: depending on the version of access you may want to try a OLEDB connection string
eg: &quot;PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=&quot;



_________________________________________________________
$str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
$Nstr = ereg_replace(&quot;sleep&quot;,&quot;coffee&quot;,$str); echo $Nstr;

onpnt2.gif
[/sub]
 
The DSN is for other parts of the site that require it. I figured it needed it some how.
--- Forgive me where is Tools or the advanced tab?

Thanks,

Andy
 
in internet explorer. apologies that was probably misleading on what I was talking about
Tools
------Internet Options
------------Advacned
-----------------uncheck &quot;Show Friendly HTTP errors messages&quot;

_________________________________________________________
$str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
$Nstr = ereg_replace(&quot;sleep&quot;,&quot;coffee&quot;,$str); echo $Nstr;

onpnt2.gif
[/sub]
 
Ah gotcha.. I was looking all over IIS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top