codice:
<%
Dim Conn
Dim SQL
Dim RS
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("mdb-database/annunci.mdb")
%>
<tr>
<td class="icona_categorie">[img]immagini/icona_casa.gif[/img]
</td>
<td class="testo_categorie"><a class="link_categorie" href="visualizza_annunci_immobili.asp">Immobili (
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'immobili'"
rs.Open SQL,conn
Response.Write(Rs("totaleRecord"))
rs.Close
Set rs = Nothing%> )</a></br>
<a class="offro_cerco_categorie" href="visualizza_annunci_immobili.asp">Offro (
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'immobili' GROUP BY modo"
rs.Open SQL,conn
If not rs.EOF then
Response.Write(Rs("totaleRecord"))
else
Response.Write("0")
end if
rs.Close
Set rs = Nothing%> )</a></br>
<a class="offro_cerco_categorie" href="visualizza_annunci_immobili.asp">Cerco(
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'immobili' GROUP BY modo"
rs.Open SQL,conn
If not rs.EOF then
Response.Write(Rs("totaleRecord"))
else
Response.Write("0")
end if
rs.Close
Set rs = Nothing%> )</a>
</td>
<td class="icona_categorie">[img]immagini/icona_lavoro.gif[/img]</td>
<td class="testo_categorie"><a class="link_categorie" href="visualizza_annunci_lavoro.asp">Lavoro (
<%Set rs=Server.CreateObject ("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'lavoro'"
rs.Open SQL,conn
Response.Write(Rs("totaleRecord"))
rs.Close
Set rs = Nothing%> )</a></br>
<a class="offro_cerco_categorie" href="visualizza_annunci_lavoro.asp">Offro (
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'lavoro' GROUP BY modo"
rs.Open SQL,conn
If not rs.EOF then
Response.Write(Rs("totaleRecord"))
else
Response.Write("0")
end if
Rs.Close
Set rs = Nothing%> )</a></br>
<a class="offro_cerco_categorie" href="visualizza_annunci_lavoro.asp">Cerco (
<%Set rs = Server.CreateObject("ADODB.Recordset")
SQL = "select COUNT(*) AS totaleRecord FROM annunci WHERE categoria = 'lavoro' GROUP BY modo"
rs.Open SQL,conn
If not rs.EOF then
Response.Write(Rs("totaleRecord"))
else
Response.Write("0")
end if
rs.Close
Set rs = Nothing%> )</a>
</td>
</tr>
</table>
<%
conn.Close
Set conn = Nothing
%>
Anche se sinceramente nell'errore mi da
ADODB.Field error '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/categorie.asp, line 0