Click to See Complete Forum and Search --> : Sum Total - Help Please


MadamZuZu
09-20-2006, 09:06 PM
Hi,
i am trying to calculate the TotalSold by creating a new variable and adding values to it from my database, for some reason it's always coming out as "0" or Blank.

please help.


....
dim iSold
iSold=0
%>

<%
do while not rs.eof
%>

<%
response.Write("<br>soldPrice:" & int(rs("soldPrice")))
i=int(rs("soldPrice"))
response.Write("<br>i:" & i)
iSold= iSold +i
response.Write("<br>iSold:" & iSold)
%>




<%rs.moveNext
loop %>

davidti
09-21-2006, 06:46 PM
In your output is I showing up blank too, or just iSold?