fortypoundhead.com

ASP Value + 1

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

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

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:



Recent Forum Posts

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers

New security implemented
dwirch posted on August 8, 2017 at about 6:43 in Site News

New security implemented
dwirch posted on July 23, 2017 at about 6:58 in Site News

Fold Code Manager into main KB?
VB6Boy posted on July 22, 2017 at about 14:42 in Site News

Fold Code Manager into main KB?
dwirch posted on July 22, 2017 at about 14:41 in Site News