codice:
<%
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("mdb-database/contatore.mdb")
strsql = "SELECT * FROM visite order by cognome asc "
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.open strsql , objconn ,3 ,3
if not objrs.EOF then
%>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td bgcolor="#FFCC00">
<table cellpadding="4" cellspacing="1" border="1" width="100%" style="border-collapse: collapse" align="left">
<%
While not objRS.EOF
if objrs("visite")= 0 then
objRs.movenext
else
%>
<tr>
<td>
<%=objrs("cognome")%></p>
<td>
<%=objrs("nome")%></p></td>
<td>
<%=objrs("visite")%></p></td>
</tr>
<% end if %>
<%
objRS.MoveNext
wend
end if
objRS.Close
Set objRS = Nothing
%>
Devi testare che il recvordset contenga qualcosa prima di recuperare i valori dei campi...
Roby