43 messaggi dal 18 settembre 2001
ciao a tutti ragazzi, qualcuno puo' aiutarmi?

ho un classico form d'inserimento dati con 20 righe o tabelle (statiche), per poter permettere all'utente di inserire piu' articoli.
esempio delle tabelle:
quantità,codice,discrezione,difetto
quantità2,codice2,discrezione2,difetto2
quantità3,codice3,discrezione3,difetto3
etc...

una volta inviati i dati della pagina, faccio puntare il tutto su un'altra pagina asp, dove estraggo appunto tutti i record dal db..
il problema è il seguente:
Succede che alla fine dei record estratti, restano le altre tabelle vuote senza record (essendo tabelle statiche)...come potrei fare per non mostrare le tabelle vuote?

ho provato con il do while..inserendolo prima della tabella ma non fa quello che voglio io...ed ho provato anche con un ciclo for next.

vi posto solo il codice della parte interessata, omettendo connessioni,query..etc...ma solo la parte che riguarda le tabelle.


<%
if not rs.eof then

response.write (quantita11)

response.write ""

else

%>



<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; BACKGROUND-ATTACHMENT: scroll; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset; BACKGROUND-REPEAT: repeat; BACKGROUND-COLOR: #1e3f75"
vAlign=top align=middle width=38 height=28>
<P class=MsoNormal><B><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><FONT color=#ff0000> </FONT><FONT color=#FFFFFF>Qt</FONT></SPAN></B></P></TD>
</font><font size="2" face="Tahoma" color="#FFFFFF">


<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; BACKGROUND-ATTACHMENT: scroll; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset; BACKGROUND-REPEAT: repeat; BACKGROUND-COLOR: #1e3f75"
vAlign=top align=middle width=156 height=28>
<p class="MsoNormal"><b><span style="font-family: Tahoma">
<font size="2" color="#FFFFFF">Codice</font></span></b></TD>
</font><font size="3" face="Verdana">


<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; BACKGROUND-ATTACHMENT: scroll; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset; BACKGROUND-REPEAT: repeat; BACKGROUND-COLOR: #1e3f75"
vAlign=top align=middle width=227 height=28>
<p class="MsoNormal"><font size="2" color="#FFFFFF"><b>
<span style="font-family: Tahoma">Descrizione</span></b></font></TD>
<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BACKGROUND-POSITION: 0% 50%; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; BACKGROUND-ATTACHMENT: scroll; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset; BACKGROUND-REPEAT: repeat; BACKGROUND-COLOR: #1e3f75"
vAlign=top align=middle width=193 height=28>
<p class="MsoNormal"><font size="2" color="#FFFFFF"><b>
<span style="font-family: Tahoma">Difetto</span></b></font></TD>
</TR>
<tr>


<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=38 height=28 bgcolor="#7A97C6">
<P class=MsoNormal> <font color="#000080">
<font size="2"><%if quantita&"[]" <> "[]" then Response.Write(quantita) end if%></P></TD>
<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=156 height=28>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%if codice&"[]" <> "[]" then Response.Write(codice) end if%><%response.write(codice)%></P></TD>
<TD
style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=227 height=28>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(descrizione)%></P></TD>
<TD


style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=193 height=28>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(difetto)%></P></TD>
</tr>
<tr>
<TD



style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=38 height=33>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(quantita2)%></P></TD>
<TD



style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=156 height=33>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(codice2)%></P></TD>
<TD




style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=227 height=33>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(descrizione2)%></P></TD>
<TD

style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=193 height=33>
<P class=MsoNormal> <font color="#000080">
<font size="2">
<%response.write(difetto2)%></P></TD>
</tr>
<tr>
<TD



style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=38 height=27>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(quantita3)%></P></TD>
<TD


style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=156 height=27>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(codice3)%></P></TD>
<TD


style="BORDER-RIGHT: #1e3f75 0.75pt inset; PADDING-RIGHT: 1.5pt; BORDER-TOP: #1e3f75 0.75pt inset; PADDING-LEFT: 1.5pt; PADDING-BOTTOM: 1.5pt; BORDER-LEFT: #1e3f75 0.75pt inset; PADDING-TOP: 1.5pt; BORDER-BOTTOM: #1e3f75 0.75pt inset"
vAlign=top align=middle width=227 height=27>
<P class=MsoNormal> <font color="#000080">
<font size="2"><%response.write(descrizione3)%></P></TD>

Torna al forum | Feed RSS

ASPItalia.com non è responsabile per il contenuto dei messaggi presenti su questo servizio, non avendo nessun controllo sui messaggi postati nei propri forum, che rappresentano l'espressione del pensiero degli autori.