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~
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~
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it. I feel like a simpleton. haha =) Thank you.
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))%>