Incrementing Number

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Background Info:
Using .asp page to create database records. I want to set
up a field in the database that increments by 1 each time
a new record is created. The only time the database will
ever be opened using Access is for any type of
maintenance, all data entered will be through .asp. How
can I accomplish this?
 
Create the field, and set its type to AutoNumber. When you're writing to the
table, don't provide a value for this field.
 
There's "meaning something" and there's "meaning something".

If you can live with the fact that there will be gaps in the numbering,
there's nothing intrinsically wrong with using the AutoNumber as a reference
number.

Realistically, the only alternative is to look up the highest number already
used and increment it prior to each record insert. That's twice as much
database traffic, and if your site gets a lot of hits, that's something you
want to avoid.
 
Back
Top