?huh?

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

I've uploaded this file as test.asp:

<% @ language="VBscript" %>
<% response.buffer=true
'Response.ExpiresAbsolute = Now() -1
'Response.AddHeader "Cache-Control", "private"%>



<%
Dim rs, Myconn, showblank, shownull
showblank="niet bekend"
shownull="niet bekend"
set Myconn = server.CreateObject("adodb.Connection")
Set rs = server.CreateObject ("Adodb.Recordset")
Myconn.Open "DBQ=" & Server.MapPath("db/resolutdb.mdb")& ";driver={microsoft Access Driver (*.mdb)};DriverID=25;maxbufferSize=8192;threads=20;", "username" ,"password"
'scriptresponder="Reserveer_stap2.asp"
'alles=rs.Fields.Count-1
%>


<html>
<head>

<title>Resolut :: Kaarten reserveren Stap 1</title>
</head>

<body bgcolor="white"><font face="arial" size="-1">

<hr>

<center>
<h5>Selecteer hieronder voor welke voorstelling u kaarten wilt reserveren<br>


<% rs.Open "Select distinct voorstellingnummer from Voorstelling", Myconn, 1 ,1
if not rs.EOF then
rs.MoveFirst
%>
<table border="1">

<tr>

<%
for each voorstellingnummer in rs.fields%>

<td bgcolor="white"><font size="-1" color="white"><%=voorstellingnummer.name%></td>
<%next%>
</tr>


<%DO UNTIL rs.EOF
%>
<tr>

<td><font face="arial" size="-2" color="black"><%my_link=scriptresponder & "?voorstellingnummer=" & rs("voorstellingnummer")%><a href="<%=my_link%>">Reserveer!</a></td>
<%for each voorstellingnummer in rs.fields
thisfield=voorstellingnummer.value
if isnull(thisfield) then
thisfield=shownull
end if
if trim (thisfield)="" then
thisfield=showblank
end if
%>
<td><%=thisfield%></td>
<%next%>
</tr>
<%rs.MoveNext
LOOP
  %></table>
<%

end if




<%
set rs = nothing
Myconn.Close %>
<% set Myconn = nothing %>


</body>
</html>
'

...but somehow IE5 says: Error 500. Internal server error.
When I upload the file as test.htm, the file is disaplayed.
I don't get it... please help me.

Shakespeare: onclick || !(onclick)

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Woohh....

debugging a script is OK, sometimes even fun. But debugging a script that isn't in english can be confusing.
Besides, I spend too much time trying to figure out what all those foreign words are.. lol

Error 500?!?

Well, my first thought is "turn off buffering'. Just delete (or comment out) that line.

I also was looking at your connection string for a while, but it seems to me that if that were the problem, then you would get an error for 'rs.open'.

try the buffer thing, and let me know what happens.

*Perl Flashback* I was writing an 80KB file and got an error 500... I didn't know how to get the line error at the time (I still don't, lol... but I haven't done any perl for a while so it don't matter).

Mark Hensler
If there is no answer on Google, then there is no question.

Jack Michaelson's picture

He has: 1,733 posts

Joined: Dec 1999

Max, I put a around the VBS-code and now it works!

BTW: The language in my code you were playing with is Dutch

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

?!?

I would'a never thought about that one!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.