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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.