Addition In ASP

I have two strings that instead of adding them together to get the sum the are concatenating together.Does anyone know how I can get these two to add

while not rstemp4.eof
vservdate = rstemp4("servdate")
vdesc = rstemp4("desc")
vservhours2 = rstemp4("servhours")
vtravelhours = rstemp4("travelhours")
vtech = rstemp4("tech")
shvar = shvar + rstemp4("servhours")
thvar = thvar + rstemp4("travelhours")

rstemp4.movenext
wend

View Replies


ADVERTISEMENT

Addition

i cant open any project in ASP.Net and neither can a create a new one

View Replies View Related

Addition

I am trying to add the values of a form. The results keep getting treated as a string and not an integer. So with :

theForm1 = Request.Form("number1")
theForm2= Request.Form("number2")
thetotal = theForm1 + theForm2
Response.Write(thetotal)

If the value of theForm1 is 4 and the value of theForm2 is 5, thetotal is 45, instead of 9.

View Replies View Related

Addition Of Two Numbers

how to add two numbers from two different textboxes and display it in the third box.

View Replies View Related

How To Do Addition Using 2 RS Values?

The problem i am having is adding 2 rs values to each other to come up with an amount.

so i have something like the following:

sql1 = "select sum(col1 + col2 + col3) as result1 from table where col4 = "y" "
set RS1 = Conn.Execute(SQL1)
pastdue1 = formatnumber(rs1("result2"))

sql2 = "select sum(col1 + col2 + col3) as result2 from table2 where col4 = "y" "
set RS2 = Conn.Execute(SQL1)
pastdue2 = formatnumber(rs2("result2"))

pastduefinal = (pastdue1 + pastdue2)

But when i do a response.write (pastduefinal) i get "0.000.00"
Does anyone have any idea? I replaced the formatnumber with formatcurrency but still didnt work. Am I using the addition incorrect?

View Replies View Related

Addition And Subtraction In SQL

I have a database with three feilds

Tbl_counter

ID
NAme
Count

Evertime the user clicks on a button in the asp page. I want to subtract on from their Count feild and then reinsert that value back into the database as ther new count value.

View Replies View Related

ASP Addition Code

<%
dim n, c, t
n = request("number")
c = request("cost")
t = c+n
%>

This code returns 43 for c=4, n=3 instead of the sum 7. Do I need any thing else?

View Replies View Related

1 Plus 1 = 1? Holding Variable For Addition

I presume it simply does not hold the variables?

On selection (could just as easily be a text field) I want to do two thing.

1) See how many times the script is run, after 5 attempts go to next page.

2) When a number is selected/typed in it should be added to the previous number

Basically I want to stop the page at either a number of loops if it reaches 5 or when the total summing of numbers equals say 4. Code:

View Replies View Related

Request Objects Addition

Can I add two request objects?

View Replies View Related

Radio Buttons And Addition

I have 2 radio buttons, Yes and No. I have a text box with a value entered by the user. If the user selects the Yes radio button, I need to add 339 to the value they entered. They will submit the form to add the value...but the problem I am getting is, it keeps adding 339 more than once. If there is also a way...where they select yes and submit and go back to no...to set the value back to the value they entered.

How can I add 339 to a value the user entered without continuing to add 339 if the form is submitted multiple times?

View Replies View Related

Addition (Sum) Of Column Data

I am trying to build the code that will add a specific column's column where something = something

Example

ID Name Amount
1 Bill 10.00
3 Ted 15.00
1 Bill 25.00
1 Bill 35.00
4 Jude 5.00

In basic word terms, this will describe what I am seeking:

SUM(amount column where ID = 1) ..... answer would be 70.00

I am already connected to the database and can pull out one specific field in a column, just can not add that column.

View Replies View Related

Addition In Populated Checkboxes

A starting price grabbed from querystring is shown to begin with. Then the options are shown(prices next to them) with checkbox(populated with over 90 options) and the user selects the options and a new total comes up upon submit. So the total of the options is a subtotal and the home and options together is the grand total. Code:

View Replies View Related

GetDate() And Bussiness Days Addition

I have current date and iam getting by GETDATE() function. Now i would like to add coming 12 business days in this date. e.g ( today is 1st Feb and if i add 12 business days in this date then the date i will get 17th Feb).

how to do it. I know there are some functions in SQL server which can be used to get the business days. Please some one tell me how is it possible.

View Replies View Related

Page Refresh Causing Addition

below is the code which is used for adding items and then displays the item
which is working fine i have a problem when i display the item if the user press f5 or does refresh it increases the qty.

so if u look at the code i get the product details from a earlier page if the qty which i get is 2 and then i do a refresh on the page the qty becomes 4 is there any way to stop it Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved