Elimina questa parte:
Inoltre nel blocco seguente già tu scorri il recordset per cui ti basta modificare questo così:codice:<% Set Con = Server.CreateObject( "ADODB.Connection" ) Con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&SERVER.MAPPATH("/mdb-database/gruppiSicilia.mdb") sql = "SELECT * FROM TabellaGruppi" set rs = con.execute(sql) Togli da qui... If IsNull(rs("blob")) then response.write("Il campo è vuoto") Else ext = right(rs("blob"),3) End If ...a qui
Spero sia chiaro.codice:<% if not rs.eof then do until rs.eof %> <tr> <td width="50" rowspan="3"> <% If IsNull(rs("blob")) then %> <% Else ext = right(rs("blob"),3) %> <a href="<%=rs("blob")%>" target="_blank"> <% if ext="pdf" then %> [img]../gfx/pdf.gif[/img] <% elseif ext="doc" then %> [img]../gfx/doc.gif[/img] <% elseif ext="jpg" then %> [img]../gfx/jpg.gif[/img] <% end if %> </a> <% End If %> </td> <td width="50" rowspan="3">[img]../gfx/trasp1px.gif[/img]</td> <td class="ContenutiROSSO"><div align="center"><%=rs("titoloGruppi")%></div></td> </tr> <tr> <td>[img]../gfx/trasp1px.gif[/img]</td> </tr> <tr> <td class="ContenutiBLU"><div align="left"><%=rs("descrizioneGruppi")%></div></td> </tr> <tr> <td colspan="3">[img]../gfx/trasp1px.gif[/img]</td> </tr> <% rs.moveNext loop end if rs.close set rs = nothing con.close set con = nothing %>

Rispondi quotando