krappleby025
Programmer
hi all can you help, I am using the following script to add decimal numbers but it is not working
<%
set query3 = con.execute("SELECT AmountCredit, AmountDebit FROM " & TransactionTable & " WHERE ScreenName = '" & Session("Logedin"
& "'"
if not query3.eof then
Do until query3.eof
AmountCredit = query3("AmountCredit"
AmountDebit = query3("AmountDebit"
TotalCredit = cint(TotalCredit) + cint(AmountCredit)
TotalDebit = cint(TotalDebit) + cint(AmountDebit)
TotalComm = cint(TotalCredit) - cint(TotalDebit)
query3.movenext
loop
end if
%>
Now i want to display the total, by using the command =totalcomm
but it is not displaying it...
The page displays
0.50
0.05
0.05
total 0.00
any help would be appreciated, BY the way, i am using MYSQL and the field is set up as Decimal 6,2
thanks
<%
set query3 = con.execute("SELECT AmountCredit, AmountDebit FROM " & TransactionTable & " WHERE ScreenName = '" & Session("Logedin"
if not query3.eof then
Do until query3.eof
AmountCredit = query3("AmountCredit"
AmountDebit = query3("AmountDebit"
TotalCredit = cint(TotalCredit) + cint(AmountCredit)
TotalDebit = cint(TotalDebit) + cint(AmountDebit)
TotalComm = cint(TotalCredit) - cint(TotalDebit)
query3.movenext
loop
end if
%>
Now i want to display the total, by using the command =totalcomm
but it is not displaying it...
The page displays
0.50
0.05
0.05
total 0.00
any help would be appreciated, BY the way, i am using MYSQL and the field is set up as Decimal 6,2
thanks