<table align="center" border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td colspan="2"></td>
</tr>
<tr>
<%
strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & _
Server.MapPath("/mdb-database/galleria.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConn
sSql=" SELECT * "
sSql=sSql & " FROM bacheca "
sSql=sSql & " ORDER BY ID DESC "
'Response.write(sSql)
' ESEGUE SQL
Set rs = conn.Execute(sSql)
If Not rs.EOF then
On Error Resume Next
rs.MoveFirst
while not rs.eof
x = x + 1
ID = rs("ID")
nomefile = rs("nomefile")
Data = rs("Data")
Titolo = rs("Titolo")
response.write "<td width=""100"">"
response.write " <a target=""_top"" href=""galleria.asp?ID="
response.write ID
response.write """>"
response.write "[img][/img]</a>"
response.write "</td>"
if (x mod 4) = 0 then
response.write "</tr>"
response.write "<tr>"
response.write "<td width=""400"" height=""50"">"
response.write "</td>"
'response.write "</tr>"
end if
%>
<%
rs.MoveNext
wend
rs.Close
Set rs = Nothing
Set Conn = Nothing
Else
Response.write "<span class=""text"">"
Response.write "Al momento non ci sono foto"
Response.write "</span>"
End If
%>