Link to home
Start Free TrialLog in
Avatar of butter_fly
butter_fly

asked on

RecordCount and Math Operations in ASP

Dear Experts,

I hardcoded a number (Total) to subtract the recordcount from. Now, I want to use a number from a field instead so we can just change the total in the database instead of using a hardcoded number like I am using here...

<%
dim Total
Total = 101              (I NEED TO MAKE 101 READ FROM A FIELD VALUE (rs.QTY) INSTEAD)
Response.Write "" & rs.RecordCount%>
 
<%Response.Write "" & CStr(Total -  rs.RecordCount)%>       (I TRIED RS.QTY HERE IT DIDNT WORK..)

Thanks Friends~
Avatar of babuno5
babuno5
Flag of India image

<%
dim Total
Total = 101              (I NEED TO MAKE 101 READ FROM A FIELD VALUE (rs.QTY) INSTEAD)
Response.Write "" & rs.RecordCount%>
 
<%Response.Write "" & CStr(Cint(Total) -  Cint(rs.RecordCount))%>
ASKER CERTIFIED SOLUTION
Avatar of joeposter649
joeposter649

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of butter_fly
butter_fly

ASKER

That was it. I feel like a simpleton. haha =) Thank you.