incrementing values

C

carmen

I have a few asp pages coded to allow for server
variables to be collected and inserted into my Access
database when visitors come to those pages. One of the
variables I am including is called Sequence whose value
is a number. I'd like to have this variable increase by 1
as my visitors flock from one page to the next.
Unfortunately, what I tried below doesn't provide
incrementing, so I am hoping for better suggestions.
Thanks in advance for any help.

Num = Num + 1
Sequence = Num
 
J

Jim Cheshire

Store the number in a Session variable and then increment it on each page.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
C

camen

Jim:

My session variable is Sequence (see below):
Sequence = Session.Contents("Seq")

After I perform an INSERT statement, I have the following
code which doesn't seem to work in incrementing:

Num = 1
Sequence = Num + 1

Any suggestions?
 
J

Jim Cheshire

That's fine, but you're not storing the incremented value back in the
session. On my next post, I'm going to get the original value again, and
when you increment it, I'll have the original value + 1 again which puts you
right back where you started.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
Top