Sto lavorando su una pagina che stampa i dati contenuti in un DB e alla fine fa la somma di alcuni campi... ma stranamente non li somma tutti ma solo quelli che al primo record hanno un valore... il codice è il seguente
l'array mi risulta così...codice:do while not rswe.eof a = 2 response.write "<tr><td>" & conta_rec & "</td>" for a = 2 to 22 if a < 19 or a > 21 then if a > 5 and a < 16 then corrente = int(rswe(a)) if corrente = "" then corrente = 0 end if somma(a) = somma(a) + corrente end if response.write "<td>" & rswe(a) & "</td>" end if next response.write "</tr>" rswe.movenext conta_rec = conta_rec + 1 loop response.write "<tr><td colspan=""5"">TOTALE</td>" tot = 6 for tot = 6 to 15 response.write "<td>" & somma(tot) & "</td>" next response.write "</tr>"
1 -
2 -
3 -
4 -
5 -
6 - 340
7 -
8 -
9 - 100
10 -
11 - 208
12 -
13 -
14 - 60
15 -
16 -
17 -
18 -
19 -
20 -
21 -
22 -
cosa può causare questo errore?
Grazie
Ciao

Rispondi quotando