|
<%
'Ouvre une connexion à la base de données Access
Dim objConn, strsql,strPath, jour1, jour2, mois(12)
Set objConn = Server.CreateObject("ADODB.Connection")
strPath = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(".") &"\nouveau\ephemeride_97.mdb"
objConn.Open strPath
mois(1) = "JANVIER"
mois(2) = "FEVRIER"
mois(3) = "MARS"
mois(4) = "AVRIL"
mois(5) = "MAI"
mois(6) = "JUIN"
mois(7) = "JUILLET"
mois(8) = "AOUT"
mois(9) = "SEPTEMBRE"
mois(10) = "OCTOBRE"
mois(11) = "NOVEMBRE"
mois(12) = "DECEMBRE"
jour1 = day(date) & "." & month(date)
jour2 = day(date) & " " & mois(month(date)) & " " & year(date)
%>
<%=jour2 %> |
<%
strSQL = "SELECT * FROM dates WHERE date='" & jour1 & "'"
Dim objRS, intPoste, I, nombre
Set objRS = Server.Createobject("ADODB.Recordset")
objRS.Open strsql, objConn
nombre = 10
If objRS("evenement10") = "-" Then nombre = 9
If objRS("evenement9") = "-" Then nombre = 8
If objRS("evenement8") = "-" Then nombre = 7
If objRS("evenement7") = "-" Then nombre = 6
If objRS("evenement6") = "-" Then nombre = 5
If objRS("evenement5") = "-" Then nombre = 4
If objRS("evenement4") = "-" Then nombre = 3
If objRS("evenement3") = "-" Then nombre = 2
If objRS("evenement2") = "-" Then nombre = 1
If objRS("evenement1") = "-" Then nombre = 0
If nombre = 0 Then
%>
|
Pas
d'événement
<%
Else
For I = 1 To nombre
%> |
|
<%=objRS("annee" & I) %> |
<%=objRS("evenement" & I) %> |
<%
Next
End If
'Elimination des objets ADO
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
|
|