Ik zit met onderstaand probleem.
Ik heb een access database met een tabel ploeg. In deze tabel staan 4 kollommen. Team thuis, thuis uit, uitslag datum. De kolom datum is van de opmaak dd/mm/jjjj
Nu zoek ik een asp script dat de eerstvolgende datum zoekt in die tabel en dan die rij uitleest.
dit heb ik:
Alleen werkt het gewoon niet. Het pikt nogal random een datum uit
Ik heb een access database met een tabel ploeg. In deze tabel staan 4 kollommen. Team thuis, thuis uit, uitslag datum. De kolom datum is van de opmaak dd/mm/jjjj
Nu zoek ik een asp script dat de eerstvolgende datum zoekt in die tabel en dan die rij uitleest.
dit heb ik:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| <%
Dim cnnSimple ' ADO connection
Dim rstSimple ' ADO recordset
Dim strDBPath ' path to our Access database (*.mdb) file
strDBPath = Server.MapPath("poging.mdb")
cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
Set rstSimple = cnnSimple.Execute("SELECT * FROM ploeg WHERE Datum<Date()")
Set rstSimple_kom = cnnSimple.Execute("SELECT * FROM ploeg WHERE Datum>Date()")
%>
<h1> </h1>
<h1>Wedstrijden vorig weekend</h1>
<table border="1">
<%
If Not rstSimple.EOF Then
%>
<tr>
<td width="80" height="43">Reeks</td>
<td width="80" height="43">Team Thuis</td>
<td width="80" height="43">Team Uit</td>
<td width="82">Datum</td>
<td width="112">Uitslag</td>
</tr>
<tr>
<td width="80" height="43"><%= rstSimple.Fields("Reeks").Value %></td>
<td width="80"><%= rstSimple.Fields("Team Thuis").Value %></td>
<td width="82"><%= rstSimple.Fields("Team Uit").Value %></td>
<td width="112"><%= rstSimple.Fields("Datum").Value %></td>
<td width="90"><%= rstSimple.Fields("Uitslag").Value %></td>
</tr>
<%
rstSimple.MoveNext
End If
'Loop
%>
</table>
<h1> </h1>
<table border="1">
<%
If Not rstSimple_kom.EOF Then
%>
<tr>
<td width="80" height="43">Reeks</td>
<td width="80" height="43">Team Thuis</td>
<td width="80" height="43">Team Uit</td>
<td width="82">Datum</td>
</tr>
<tr>
<td width="80" height="43"><%= rstSimple.Fields("Reeks").Value %></td>
<td width="80" height="43"><%= rstSimple_kom.Fields("Team Thuis").Value %></td>
<td width="82"><%= rstSimple_kom.Fields("Team Uit").Value %></td>
<td width="112"><%= rstSimple_kom.Fields("Datum").Value %></td>
</tr>
<%
rstSimple_kom.MoveNext
End If
'Loop
%>
</table>
<%
rstSimple.Close
Set rstSimple = Nothing
cnnSimple.Close
Set cnnSimple = Nothing
%> |
Alleen werkt het gewoon niet. Het pikt nogal random een datum uit