Si avevo visto, ma non dipende da quello l'errore.
cmq posto il codice
codice:
<table>
<%
' Mappaggio del database
set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("/mdb-database/database.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn
' Stringa di interrogazione sulla tabella
Dim Giorno
Giorno = RIGHT("00" & Day(Date()), 2)
sql = "SELECT * FROM Programmi WHERE Film='Horror'" & " AND Data='" & Giorno & "'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn ,3,3
do while not(rs.eof)
%>
<tr>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(2)%></td>
<td width="30%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(3)%></td>
<td width="35%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(4)%></td>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(5)%></td>
<td width="10%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(6)%></td>
<td width="15%" height="18" align="center" bgcolor="#FFFFFF"></td>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"></td>
</tr>
<%
rs.movenext
loop
%>
<tr>
<td width="5%" height="19" align="center" bgcolor="#FFCCFF"></td>
<td width="30%" height="19" align="center" bgcolor="#FFCCFF"></td>
<td width="35%" height="19" align="center" bgcolor="#FFCCFF"></td>
<td width="5%" height="19" align="center" bgcolor="#FFCCFF"></td>
<td width="10%" height="19" align="center" bgcolor="#FFCCFF"></td>
<td width="15%" height="19" align="center" bgcolor="#FFCCFF"><%=rs(7)%></td>
<td width="5%" height="19" align="center" bgcolor="#FFCCFF"><%=rs(9)%></td>
</tr>
<%
rs.Close
set rs = Nothing
conn.Close
set conn = Nothing
%>
</table>
così com'è il codice mostra i risultati solo qui:
codice:
<tr>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(2)%></td>
<td width="30%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(3)%></td>
<td width="35%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(4)%></td>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(5)%></td>
<td width="10%" height="18" align="center" bgcolor="#FFFFFF"><%=rs(6)%></td>
<td width="15%" height="18" align="center" bgcolor="#FFFFFF"></td>
<td width="5%" height="18" align="center" bgcolor="#FFFFFF"></td>
</tr>
creando una riga per ogni dato che trova. E va bene.
Invece dove c'è il codice <%=rs(7)%> mi da questo errore:
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/pagina.asp, line 0