Questo quello che accade ...ovvero mi stampa tutti gli ID ma non tutte le img che mi servono...

Codice pagina:

<%
Dim count
set Gallery = Server.CreateObject("ADODB.Recordset")
sql = "select * from Gallery"
Gallery.ActiveConnection = cn
Gallery.Open sql, cn
count = 0
%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%Do while not Gallery.EOF%>
<%response.Write(gallery("IDGallery"))%>
<% if count = 0 then %>
<tr>
<%else%>
<td align="center">
<%if isNull (Gallery("immagine")) or (Gallery("immagine")) = "" then%>
<%if isNull (Gallery("video2")) or (Gallery("video2")) = "" then%>
<%response.Write("video no link")%>
[img]gallery/ico_video.jpg[/img]
<font class="nero2"><%=Gallery("descrizione")%></font>
<%else%>
<%response.Write("video link")%>
">[img]gallery/ico_video.jpg[/img]
<font class="nero2"><%=Gallery("descrizione")%></font>
<%end if%>
<%else%>
<%if isNull (Gallery("immagine2")) or (Gallery("immagine2")) = "" then%>
<%response.Write("immagine no link")%>
[img]gallery/<%=Gallery([/img]" border="0">
<font class="nero2"><%=Gallery("descrizione")%></font>
<%else%>
<%response.Write("immagine link")%>
')">[img]gallery/<%=Gallery([/img]" border="0">
<font class="nero2"><%=Gallery("descrizione")%></font>
<%end if%>


<%end if%>
</td>
<%if count = 3 then%>
</tr>
<%count = 0%>
<%end if%>
<%end if%>
<%
count = count + 1
Gallery.movenext
loop
%>

</table>



risultato: