<%
dato1 = FormatDateTime(Date, 2)
dato = "04-01-01"
%>
<html>
<title>Hente data fra database</title>
<head>
<meta http-equiv="Content-Language" content="da">
<link rel="stylesheet" type="text/css" href="
http://home8.inet.tele.dk/fsbr/eng/awpage.css"></head>
<body>
<p>
Aktuel dato: <%=dato%><br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1" height="28">
<tr>
<td width="14%" align="center" height="14">Navn:</td>
<td width="14%" align="center" height="14">Maximum:</font></td>
<td width="14%" align="center" height="14">1/4 af Maximum:</font></td>
<td width="14%" align="center" height="14">Aktivitet:</font></td>
<td width="15%" align="center" height="14">Antal pr. time:</font></td>
<td width="15%" align="center" height="14">Konstellation:</font></td>
</tr>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("../date.mdb")
Conn.Open DSN
strSQL = "Select * From meteoric Order by ID"
Set rs = Conn.Execute(strSQL)
Do
IF dato <= rs("Activity Til") AND dato >= rs("Activity FRA") THEN
%>
<tr>
<td width="15%" height="13"><%=rs("name")%></td>
<td width="14%" height="13"><%=rs("maximum")%></td>
<td width="14%" height="13"><%=rs("1/4 fra")%> - <%=rs("1/4 Til")%></td>
<td width="14%" height="13"><%=rs("Activity Til")%> - <%=rs("Activity Fra")%></td>
<td width="15%" height="13"><%=rs("Amount pr hour")%></td>
<td width="15%" height="13"><%=rs("Constallation")%></td>
</tr>
<%
End If
rs.MoveNext
' Fortsæt indtil rs er gennemløbet (EOF = End Of File)
Loop While Not rs.EOF
' Luk databaseforbindelse
Conn.Close
Set Conn = Nothing
%>
</p>
</table>
</body>
</html>