I have looked all over the forums for the answer to my question, but I cannot find anything. I am kinda new to ASP so this may be obvious to you all. So if anyone can help me it would be appreciated.
I am trying to add two numbers. One comes from a form field the other comes from a database record. I am trying to add on to the database record the number in the form field.
eg...if the form field has a value of 1 and the database had a value of 20, the new database value would be 21
I have a form, with a field that holds the number.
input type='text' name= 'getnumber' value = '1'
The form action goes to the next page where I dim StrGetNumber and give it the value of the form field (getnumber).
On the current page, I collect the current totol from the database...response.write(rs("total")
Now I want to add these up so I use...
Dim NewTotal
NewTotal = rs("total" + StrGetNumber
Now instead of getting a new total of 21...I get a value of 201...meaning that it is appending the value of the form field and not adding it to the total.
I am sure that it is just a syntax problem, but as I said I looked all over the place before posting this message.
Please help if you can,
Happyb
I am trying to add two numbers. One comes from a form field the other comes from a database record. I am trying to add on to the database record the number in the form field.
eg...if the form field has a value of 1 and the database had a value of 20, the new database value would be 21
I have a form, with a field that holds the number.
input type='text' name= 'getnumber' value = '1'
The form action goes to the next page where I dim StrGetNumber and give it the value of the form field (getnumber).
On the current page, I collect the current totol from the database...response.write(rs("total")
Now I want to add these up so I use...
Dim NewTotal
NewTotal = rs("total" + StrGetNumber
Now instead of getting a new total of 21...I get a value of 201...meaning that it is appending the value of the form field and not adding it to the total.
I am sure that it is just a syntax problem, but as I said I looked all over the place before posting this message.
Please help if you can,
Happyb