Har nu gjort følgende:
sql1 = \"SELECT TOP 4 * FROM Nyheder ORDER BY Id DESC\"
Set rs_nyt = Connect.Execute(sql1)
do while rs_nyt.eof = false
i = i + 1
tab(i,1) = rs_nyt(\"Id\")
Response.Write tab(i,1)
Response.End
Men det giver stadig samme fejl.
Jeg poster lige hele min kode hvis det kan hjælpe:
<%
Set Connect = Server.CreateObject(\"ADODB.Connection\")
Connect.Open \"vff_ny\"
sql1 = \"SELECT TOP 4 * FROM Nyheder ORDER BY Id DESC\"
Set rs_nyt = Connect.Execute(sql1)
do while rs_nyt.eof = false
i = i + 1
tab(i,1) = rs_nyt(\"Id\")
Response.Write tab(i,1)
Response.End
tab(i,2) = rs_nyt(\"Dato\")
tab(i,3) = rs_nyt(\"Overskrift\")
tab(i,4) = rs_nyt(\"Tekst\")
tab(i,5) = rs_nyt(\"Forside1\")
tab(i,6) = rs_nyt(\"Forside2\")
tab(i,7) = rs_nyt(\"Pic\")
tab(i,8) = rs_nyt(\"No_pic\")
rs_nyt.movenext
loop
sql2 = \"SELECT TOP 1 * FROM Kampdata ORDER BY Id DESC\"
Set rs_kamp = Connect.Execute(sql2)
sql3 = \"SELECT TOP 1 * FROM Referater WHERE Dato > Date()-2 ORDER BY Id DESC\"
Set rs_ref = Connect.Execute(sql3)
%>
<!-- #include file=\"counter/online_taeller.asp\" -->
<!-- #include file=\"counter/taeller.asp\" -->
<html>
<head>
<title>Viborg FF - Prof. Fodbold A/S</title>
<script language=\"javascript\">
<!--
var Win1=null;
function openPopUp(inURL, inWidth, inHeight) {
if (!Win1 || Win1.closed) {
var posX = (screen.availHeight - inHeight) / 2;
var posY = (screen.availWidth - inWidth)/ 2;
var strParams = \'width=\' + inWidth + \',height=\' + inHeight + \',top=\' + posX + \',left=\' + posY + \',statusbar=no,menubar=no,resizable=no,scrollbars=yes,hotkeys=no\';
Win1 = window.open(inURL, \'vindue\', strParams);
}else{
Win1.focus();
}
}
function do_select (val) {
if (!val) return
top.location.href = val
}
//-->
</script>
</head>
<body bgcolor=\"#ffffff\" background=\"images/structure/test.jpg\" link=\"#006633\" vlink=\"#006633\" alink=\"#006600\">
<!-- The line below is the line that have to be added to ALL pages that goes in the main frame -->
<script language=\"JavaScript1.2\" src=\"cframe.js\" type=\"text/javascript\"></script>
<table border=\"0\" cellpadding=\"0\" cellspacing=\"10\" width=\"783\">
<tr>
<%
For i = 1 to 2 step 2
%>
<td width=\"275\" valign=\"top\">
<font face=\"Verdana\" size=\"2\" color=\"#000000\">
<%
If tab(i,8) = \"on\" Then
Response.Write(\"\")
Else
Response.Write(\"<img src=\"\"images/news/\"&tab(i,7)&\"\"\" border=\"\"0\"\" width=\"\"100\"\" height=\"\"75\"\">\")
End if
%><br>
<b><%=tab(i,3)%></b><br>
<font size=\"1\"><%Response.Write(replace(left(tab(i,4),300),VbCrLf,\"<br>\"))%>...<br>
<i><a href=\"sidstenyt.asp?id=<%=tab(i,1)%>\">Læs hele nyheden</a></i></font>
</font>
</td>
<td width=\"275\" valign=\"top\">
<font face=\"Verdana\" size=\"2\" color=\"#000000\">
<%
If tab(i+1,8) = \"on\" Then
Response.Write(\"\")
Else
Response.Write(\"<img src=\"\"images/news/\"&tab(i+1,7)&\"\"\" border=\"\"0\"\" width=\"\"100\"\" height=\"\"75\"\">\")
End if
%><br>
<b><%=tab(i+1,3)%></b><br>
<font size=\"1\"><%Response.Write(replace(left(tab(i+1,4),300),VbCrLf,\"<br>\"))%>...<br>
<i><a href=\"sidstenyt.asp?id=<%=tab(i+1,1)%>\">Læs hele nyheden</a></i></font>
</font>
</td>
<%
next
%>
<td width=\"233\" valign=\"top\" align=\"right\">
<br>
<table border=\"0\" width=\"190\" cellpadding=\"0\" cellspacing=\"0\">
<tr bgcolor=\"#cccccc\">
<td>
<img src=\"images/structure/str_nastekamp_top.jpg\" width=\"190\" height=\"21\">
</td>
</tr>
<tr bgcolor=\"#cccccc\">
<td>
<table border=\"0\" cellpadding=\"0\" cellspacing=\"11\">
<tr>
<td>
<font face=\"Verdana\" size=\"1\" color=\"#000000\">
<%
If (rs_kamp.bof OR rs_kamp.eof) Then
Response.Write(\"Ingen kampe pt.\")
Else
If rs_kamp(\"Hjemmekamp\") = \"on\" Then
Response.Write(\"<b>Viborg FF - \"&rs_kamp(\"Modstander\")&\"</b><br><br>\"&rs_kamp(\"Pasus\")&\"\")
Else
Response.Write(\"<b>\"&rs_kamp(\"Modstander\")&\" - Viborg FF</b><br><br>\"&rs_kamp(\"Pasus\")&\"\")
End if
End if
%>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<a href=\"naestekamp.asp?id=<%=rs_kamp(\"Id\")%>\"><img src=\"images/structure/str_kasse_bund_mere.jpg\" width=\"190\" height=\"21\" border=\"0\"></a>
</td>
</tr>
</table>
<br>
<table border=\"0\" width=\"190\" cellpadding=\"0\" cellspacing=\"0\">
<tr bgcolor=\"#cccccc\">
<td>
<img src=\"images/structure/str_fan_top.jpg\" width=\"190\" height=\"21\">
</td>
</tr>
<tr bgcolor=\"#cccccc\">
<td>
</td>
</tr>
<tr>
<td>
<a href=\"
http://www.thegreenpride.dk\" target=\"_blank\"><img src=\"images/structure/str_kasse_bund.jpg\" width=\"190\" height=\"21\" border=\"0\"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<%
For i = 3 to 4 step 2
%>
<td width=\"275\" valign=\"top\">
<font face=\"Verdana\" size=\"2\" color=\"#000000\">
<%
If tab(i,8) = \"on\" Then
Response.Write(\"\")
Else
Response.Write(\"<img src=\"\"images/news/\"&tab(i,7)&\"\"\" border=\"\"0\"\" width=\"\"100\"\" height=\"\"75\"\">\")
End if
%><br>
<b><%=tab(i,3)%></b><br>
<font size=\"1\"><%Response.Write(replace(left(tab(i,4),300),VbCrLf,\"<br>\"))%>...<br>
<i><a href=\"sidstenyt.asp?id=<%=tab(i,1)%>\">Læs hele nyheden</a></i></font>
</font>
</td>
<td width=\"275\" valign=\"top\">
<font face=\"Verdana\" size=\"2\" color=\"#000000\">
<%
If tab(i+1,8) = \"on\" Then
Response.Write(\"\")
Else
Response.Write(\"<img src=\"\"images/news/\"&tab(i+1,7)&\"\"\" border=\"\"0\"\" width=\"\"100\"\" height=\"\"75\"\">\")
End if
%><br>
<b><%=tab(i+1,3)%></b><br>
<font size=\"1\"><%Response.Write(replace(left(tab(i+1,4),300),VbCrLf,\"<br>\"))%>...<br>
<i><a href=\"sidstenyt.asp?id=<%=tab(i+1,1)%>\">Læs hele nyheden</a></i></font>
</font>
</td>
<%
next
%>
<td align=\"right\" valign=\"top\">
<table border=\"0\" width=\"190\" cellpadding=\"0\" cellspacing=\"0\">
<tr bgcolor=\"#cccccc\">
<td>
<img src=\"images/structure/str_adm_top_ny.jpg\" width=\"190\" height=\"21\">
</td>
</tr>
<tr bgcolor=\"#cccccc\">
<td>
</td>
</tr>
<tr>
<td>
<a href=\"java script:window.openPopUp(\'admin_popup.asp\', 350, 300)\"><img src=\"images/structure/str_adm_bund.jpg\" width=\"190\" height=\"21\" border=\"0\"></a>
</td>
</tr>
</table>
<br>
<table border=\"0\" width=\"190\" cellpadding=\"0\" cellspacing=\"0\">
<tr bgcolor=\"#cccccc\">
<td>
<img src=\"images/structure/str_stadion_top.jpg\" width=\"190\" height=\"21\">
</td>
</tr>
<tr bgcolor=\"#cccccc\">
<td>
</td>
</tr>
<tr>
<td>
<a href=\"stadion_pics.asp\"><img src=\"images/structure/str_stadion_bund.jpg\" width=\"190\" height=\"21\" border=\"0\"></a>
</td>
</tr>
</table>
<br>
<table border=\"0\" width=\"190\" cellpadding=\"0\" cellspacing=\"0\">
<tr bgcolor=\"#cccccc\">
<td>
<img src=\"images/structure/str_skribent_top.jpg\" width=\"190\" height=\"21\">
</td>
</tr>
<tr bgcolor=\"#cccccc\">
<td>
</td>
</tr>
<tr>
<td>
<a href=\"skribent.asp\"><img src=\"images/structure/str_kasse_bund_mere.jpg\" width=\"190\" height=\"21\" border=\"0\"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=\"2\">
<font face=\"Verdana\" size=\"2\" color=\"#000000\">
<%
If (rs_ref.bof OR rs_ref.eof) Then
Response.Write(\"\")
Else
%>
<font size=\"1\">
<%=rs_ref(\"Dato\")%><br>
<font size=\"2\">
<b>
<%
If rs_ref(\"Hjemmekamp\") = \"on\" Then
Response.Write(\"Viborg FF - \"&rs_ref(\"Modstander\")&\" (\"&rs_ref(\"Resultat\")&\")\")
Else
Response.Write(\"\"&rs_ref(\"Modstander\")&\" - Viborg FF (\"&rs_ref(\"Resultat\")&\")\")
End if
%>
</b></font><br>
Tilskuere: <%=rs_ref(\"Tilskuere\")%>
<br><br>
<%=rs_ref(\"Overskrift\")%>
<br>
<%
Response.Write(replace(left(rs_ref(\"Kampreferat\"),500),VbCrLf,\"<br>\"))
%>...
<br><br>
<i><a href=\"sidstekamp.asp?id=<%=rs_ref(\"Id\")%>\">Læs hele referatet...</a></i>
</font>
<%
End if
%>
</font>
</td>
<td>
</td>
</tr>
</table>
</body>
</html>