Vis kun de første 3
Jeg har en nyheds viser, som kun skal vise de første 3 beskeder i stedet for alle.<%
Response.Buffer = True
' Connection til database
Set Con = Server.CreateObject("ADODB.Connection")
DBPath = "DBQ=" & server.mappath("admin/nyheder.mdb")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & DBPath
' Her hiver vi indholdet af databasen ud, sorterer dem efter dato
Sql = "SELECT * FROM nyheder ORDER BY Dato DESC"
Set Record = Con.Execute(Sql)
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>forside</title>
</head>
<body bgproperties="fixed" background="grafik/Pil_13.jpg" link="#3366FF" vlink="#3366FF" alink="#3366FF" bgcolor="#000000">
<p align="center"><u><b><font face="Verdana" size="6">~*Chrisas Chinchilla*~</font></b></u></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="50%"><center><b><u><font size="2" face="Verdana">Nyheder</font></u></b></center><hr>
<% Do While Not Record.EOF %>
<b><font size="2" face="Verdana">Den : </font> </b>
<font size="2" face="Verdana"><% Response.Write Record("Dato")%></font><br>
<font face="Verdana">
<b><font size="2">Navn : </font> </b><font size="2"><% Response.Write Record("Forfatter")%><br>
<b>Nyhed : </b><% Response.Write Record("Nyhed") %></font></font><br>
<br></p>
<hr>
<%
Record.MoveNext
Loop
%>
<%
' Lukke connection
Con.Close
Set Con = Nothing
%>
</td>
<td width="50%">
<APPLET height=400
archive=../Billeder/web/bilder%20til%20forside/AnLake.jar width=287
code=AnLake.class align="right"><PARAM NAME="credits" VALUE="Applet by Fabio Ciucci (www.anfyteam.com)"><PARAM NAME="res" VALUE="1"><PARAM NAME="image" VALUE="Peja 19.jpg"><PARAM NAME="wavspeed" VALUE="30"><PARAM NAME="perspective" VALUE="10"><PARAM NAME="farwaving" VALUE="200"><PARAM NAME="wind" VALUE="10"><PARAM NAME="windvarval" VALUE="5"><PARAM NAME="windvarmin" VALUE="5"><PARAM NAME="windvarmax" VALUE="15"><PARAM NAME="halfreflect" VALUE="NO"><PARAM NAME="overimg" VALUE="NO"><PARAM NAME="overimgX" VALUE="0"><PARAM NAME="overimgY" VALUE="0"><PARAM NAME="textscroll" VALUE="lakescr.txt"><PARAM NAME="texttype" VALUE="zooming"><PARAM NAME="textvspace" VALUE="0"><PARAM NAME="textminfont" VALUE="8"><PARAM NAME="textmaxfont" VALUE="172"><PARAM NAME="textoffset" VALUE="240"><PARAM NAME="textspeed" VALUE="2"><PARAM NAME="textfont" VALUE="Helvetica"><PARAM NAME="textbold" VALUE="NO"><PARAM NAME="textitalic" VALUE="NO"><PARAM NAME="textsize" VALUE="24"><PARAM NAME="textshadow" VALUE="YES"><PARAM NAME="TextSColR" VALUE="20"><PARAM NAME="TextSColG" VALUE="20"><PARAM NAME="TextSColB" VALUE="50"><PARAM NAME="TextColR" VALUE="255"><PARAM NAME="TextColG" VALUE="255"><PARAM NAME="TextColB" VALUE="155"><PARAM NAME="TextJumpAmp" VALUE="0"><PARAM NAME="TextJumpSpd" VALUE="0"><PARAM NAME="TextSineAmp" VALUE="0"><PARAM NAME="TextSineSpd" VALUE="0"><PARAM NAME="TextSineAngle" VALUE="0"><PARAM NAME="regcode" VALUE="NO"><PARAM NAME="reglink" VALUE="NO"><PARAM NAME="regnewframe" VALUE="NO"><PARAM NAME="regframename" VALUE="_blank"><PARAM NAME="statusmsg" VALUE="AnLake applet"><PARAM NAME="memdelay" VALUE="1000"><PARAM NAME="priority" VALUE="3"><PARAM NAME="MinSYNC" VALUE="10">
Sorry, your browser doesn't support Java(tm).</APPLET></td>
</tr>
<tr>
<td width="100%" colspan="2">
<p style="line-height: 100%; margin-top: 1px; margin-bottom: 1px" align="center"> </p>
<p style="line-height: 100%; margin-top: 1px; margin-bottom: 1px" align="center"> </p>
<p style="line-height: 100%; margin-top: 1px; margin-bottom: 1px" align="center"> </p>
<p style="line-height: 100%; margin-top: 1px; margin-bottom: 1px" align="center">
<font face="Times New Roman" color="#000000" size="2">Alle rettigheder
forbeholdes / Copyright 2003 <a href="mailto:chrisas@chrisas-chinchilla.dk">
Dorthe Tomicich</a></font></p>
<center>
<p style="margin-top: 2px" align="center"> <font face="Times New Roman" color="#000000" size="1">Sidst
opdateret d. 08-06-03 </font></p>
</center></td>
</tr>
</table>
</body>
</html>