Siden virker med den kommer med en fejl
Hej,Jeg har prøvet at lave denne kode i asp og den virker også men den kommer med en Server 500-fejl. Er det ikke fordi jeg bruger samme funktion 4 gange eller hvad? Hvordan kan jeg løse problemet?
<%
Set myConn = Server.CreateObject("ADODB.connection")
myConn.Open("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("forum.mdb")) ' Opret forbindelse til databasen
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="Stone's WebWriter 3.5">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Test</TITLE>
<LINK REL="STYLESHEET" HREF="../images/tekst.css" TYPE="text/css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000">
<BR><BR><BR><TABLE WIDTH="500" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<TR>
<TD BGCOLOR="#FFFFFF" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"> <B>3d programmer</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Indlæg</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Seneste</B></TD>
</TR>
<%
if Request.QueryString("id") = "" then ' Hvis der ikke er specificeret en "id", vises liste over alle forum
Set DBoutPut = myConn.Execute("Select * From forums WHERE Description = '3D-programmer'")
While not DBoutPut.EOF
%>
<TR>
<TD STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px"><%=DBoutPut("forum")%></TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21</TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21-09-2002 19:24</TD>
</TR>
<%
DBoutPut.Movenext
Wend
%>
</TABLE><% end if %><BR><BR>
<TABLE WIDTH="500" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<TR>
<TD BGCOLOR="#FFFFFF" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"> <B>2D programmer</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Indlæg</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Seneste</B></TD>
</TR>
<%
if Request.QueryString("id") = "" then ' Hvis der ikke er specificeret en "id", vises liste over alle forum
Set DBoutPut = myConn.Execute("Select * From forums WHERE Description = '2D-programmer'")
While not DBoutPut.EOF
%>
<TR>
<TD STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px"><%=DBoutPut("forum")%></TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21</TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21-09-2002 19:24</TD>
</TR>
<%
DBoutPut.Movenext
Wend
%>
</TABLE><% end if %><BR><BR>
<TABLE WIDTH="500" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<TR>
<TD BGCOLOR="#FFFFFF" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"> <B>Vurdering</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Indlæg</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Seneste</B></TD>
</TR>
<%
if Request.QueryString("id") = "" then ' Hvis der ikke er specificeret en "id", vises liste over alle forum
Set DBoutPut = myConn.Execute("Select * From forums WHERE Description = 'Vurdering'")
While not DBoutPut.EOF
%>
<TR>
<TD STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px"><%=DBoutPut("forum")%></TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21</TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21-09-2002 19:24</TD>
</TR>
<%
DBoutPut.Movenext
Wend
%>
</TABLE><% end if %><BR><BR>
<TABLE WIDTH="500" BORDER="0" CELLSPACING="1" CELLPADDING="1">
<TR>
<TD BGCOLOR="#FFFFFF" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"> <B>ekspert.dk</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Indlæg</B></TD>
<TD BGCOLOR="#FFFFFF" ALIGN="center" STYLE="border-bottom: thin solid #AEAEB6; border-bottom-width: 1"><B>Seneste</B></TD>
</TR>
<%
if Request.QueryString("id") = "" then ' Hvis der ikke er specificeret en "id", vises liste over alle forum
Set DBoutPut = myConn.Execute("Select * From forums WHERE Description = 'ekspert.dk'")
While not DBoutPut.EOF
%>
<TR>
<TD STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px"><%=DBoutPut("forum")%></TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21</TD>
<TD ALIGN="center" STYLE="border-bottom: thin dotted #E2E2E2; border-bottom-width: 1px">21-09-2002 19:24</TD>
</TR>
<%
DBoutPut.Movenext
Wend
%>
</TABLE><% end if %>
</BODY>
</HTML>
