¿Qué hay de malo en este código? Es para mis alumnos; unos tests de preguntas sobre Publicidad.
Me da error 500.
Gracias a todos,
Emajesus
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ= VBQUIZ.mdb"
set RS = Conn.Execute("SELECT * FROM [quiz] WHERE [QuizID]=" & request.querystring("Quiz"))
%>
<font face="Arial">
<b><% =rs("QuizName") %></b>
<hr>
<font size=2>
<% =rs("quizheader") %>
<p>
<form action="vbmark.asp?quiz=<% =request.querystring("quiz") %>" method="post">
<%
rs.close
'now start the main loop to find all the questions
set RS = Conn.Execute("SELECT * FROM [question] WHERE [QuizID]=" & request.querystring("Quiz") & " ORDER BY [Number]")
if not RS.EOF then
RS.movefirst
do
response.write "<b>" & rs("Number") & ". " & rs("Question") & "</b><p>" & chr(13)
'now display the available options
set ORS = Conn.Execute("SELECT * FROM [option] WHERE [QuestionID]=" & RS("QuestionID") )
if not ORS.EOF then
ORS.movefirst
do
response.write "<input type=Radio Name=""Question" & RS("QuestionID") & """ Value=""Answer" & ORS("OptionID") & """>" & ORS("Option") & "<br>" & chr(13)
ORS.movenext
loop until ORS.EOF
end if
response.write "<p>"
RS.movenext
loop until RS.EOF
end if
conn.close
%>
<hr>
<input type=submit value="Submit"> Respuestas
</form>
</BODY></HTML>