<%
Dim oConn
Dim oRs
Dim filePath
Dim Index
filePath = Server.MapPath("database.mdb")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
Set oRs = oConn.Execute("SELECT cod_prod, Marca, Modello, Sezione, Descrizione, Prezzo, Immagine From tProdotti")
%>
<table width="250" height="51" border="1">
<tr>
<td>Codice</td>
<td>Marca</td>
<td>Modello</td>
<td>Sezione</td>
<td>Descrizione</td>
<td>Prezzo</td>
<td>Immagine</td>
</tr>
<%
if oRs.eof then
Response.Write "NON ESISTE"
ELSE
Do while Not oRs.eof
%>
<tr>
<td><%Response.Write (oRs("cod_prod"))%></td>
<td><%Response.Write (oRs("Marca"))%></td>
<td><%Response.Write (oRs("Modello"))%></td>
<td><%Response.Write (oRs("Sezione"))%></td>
<td><%Response.Write (oRs("Descrizione"))%></td>
<td><%Response.Write (oRs("Prezzo"))%></td>
<td>[img]<%Response.Write(oRs([/img]"</td>
</tr>
<% oRs.MoveNext
Loop
END IF
oRs.close
oConn.close
%>
</table>