I need a routine to generate a unique number for a key

D

David

Due to reasons too complex to explain I need a routine to
generate a unique number for a key

I cannot use the autonumber Key feature for this since I MUST know the number before I add records. I must also be able to jump sequences in certain circumstances

I envision a table with one row 'next_number' which will
be accessed with exclusive lock and updated before lock is
released
Does anyone have reliable working code so I dont have to
reinvent the wheel
Also what happens if two users hit this routine at the
same time, do I need a short 'wait and retry' loop
I'm using ADO access in Access 2000. This is a multi-user
system.
 

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