syntax help - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

syntax help

I am trying to calculate the sum of a table. intSumeleven = intSumeleven + myCustomerRS.Fields 'Eleven' I am not sure what I am missing here.

here is an example of my code. any help would be much appreciated.

<%
Do While myCustomerRS.EOF = False
%>
<%
dim intSumEleven
%>


<% Response.Write(myCustomerRS.Fields("L_Name")) %> 
<% Response.Write(myCustomerRS.Fields("F_Name")) %> 
<% Response.Write(myCustomerRS.Fields("Order_Number")) %> 
<% Response.Write(myCustomerRS.Fields("Due_Date")) %> 
<% Response.Write(myCustomerRS.Fields("Eleven")) %> 
<% Response.Write(myCustomerRS.Fields("Sixteen")) %> 
<% Response.Write(myCustomerRS.Fields("Twenty")) %> 



<%
intSumeleven = intSumeleven + myCustomerRS.Fields 'Eleven'

myCustomerRS.MoveNext
Loop

End If
%>




<%Response.write intSumeleven%>



Comments

  • RupeshNRupeshN Posts: 8Member
    Hi,

    I think it might just be problem with the datatype , it may not able to convert into the proper datatype .If Eleven datatype is number then the problem could arise
    If problem is the above I would suggest u to use

    intSumeleven = Cint(intSumeleven) + myCustomerRS.Fields ("Eleven")



  • Omega99Omega99 Posts: 19Member
    Thankyou Very Much,

    You were exactly right. I really appreciate your help



    :

    Hi,
    :
    : I think it might just be problem with the datatype , it may not able to convert into the proper datatype .If Eleven datatype is number then the problem could arise
    : If problem is the above I would suggest u to use
    :
    : intSumeleven = Cint(intSumeleven) + myCustomerRS.Fields ("Eleven")
    :
    :
    :
    :

Sign In or Register to comment.