ASP Value + 1

Nick asked this question on 12/7/2012. It has been viewed 664 times, and is currently resolved.

Disapprove Delete

What would I do if I have an existing value from such as a Database, but I want to add 1 to it, such as 20 + 1 = 21

Keywords:

Answer from dwirch on 12/7/2012

Disapprove Delete

You'll store your value in a variable. For example:

MyValue=21
MyValue=MyValue+1


you could also retrieve MyValue from a database, then store it back:

MyValue=objRS.MyField("MyValue")
MyValue=MyValue+1
objConn.Execute "Update MyTable Set MyValue=<% MyValue %> where My RecordID=x"

Reference:


Code Links