sequential numbering

  • Thread starter Gene McKinney YMCA international
  • Start date
G

Gene McKinney YMCA international

I need to have a form with a number that changes for each time it is opened.

Like a registration number.

Is this possible? Thanks
 
S

Steve Easton

Would require a database and server side scripting

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
C

clintonG

Yes, its possible. Does the number have to be exposed to the user? A
database will generate or already generates sequential numbers. The
number(s) can be generated independently using script or the number(s)
generated by the database can be reused as is or modified to match a
particular sequential value.

Just what is it you need to do?

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/



"Gene McKinney YMCA international"
 
K

Kevin Spencer

It can also be done with a text file, similar to a hit counter. The text
file is opened by a server-side script, and contains a number. The script
increments the number, re-saves the text file, and does whatever else you
need to do in handling the form.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 
G

Gene McKinney YMCA international

We have a work order form and each time a person prints one out it needs to
have the next number on it. Like 1008 then 1009 so on.
 
C

clintonG

Most databases are developed to use a built-in feature used to autoincrement
an integer number that is stored in a column and used to uniquely identify
each record added to the database. That column is usually made to function
as a Primary Key (PK) to ensure each record is unique. Basically, the PK is
how the 'relational' aspects of a relational database interact with one
another.

When using the database to autoincrement in this manner the PK value will be
1,2,3 and so on. When initially created, the autoincremented number can be
seeded to start at some predetermined number such as 10 and made to
increment in two's, fives,or tens and so on. Most I assume simply start at 1
and increment by 1 each time a new record is added but starting at 1000 is
not unreasonable either.

IMO the easiest and most reliable method for a work order number is similar
to the invoice numbering schemas I've devised for e-commerce customers. The
methodology would reuse the PK value as doing so also provides an audit
trail. Using code, the value of the PK can be returned after each work order
is created as each work order is unique and will therefor have its own
unique PK value. You can accept the returned PK value as is or use the PK
value as a base value which is then appended and prefixed or postfixed with
other identifying characteristics which are usually delineated alphanumeric
series of characters.

For example; 2F-00035 where the PK value autoincremented by the database is
35 indicating the 35th work order created. Code would then append the
alphanumeric prefix 2F indicating the work order was for the 2nd Floor.
Script would append three zeros to the PK value resulting in '00035'
providing a series of 99,999 work orders for this schema.

Identifier schemas have to be carefully thought out however as it is easy to
schema one's self into a corner. When you hear web developers talk about
'scalability' this is the type of context they are referring to. Suffice it
to say, what I understand at this point in time indicates the need for
custom coding.

What database are you using? Tell us more about the rest of the work order
process.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/








"Gene McKinney YMCA international"
 
K

Kevin Spencer

Hi Gene,

You would still need to use server-side programming to generate the form.
The value that is incremented must be stored somewhere, and it certainly
won't be stored on the client.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Gene McKinney YMCA international"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top