table lock / sharing issue

D

dl

I have a network shared db used to generate and store barcode numbers, and
the data associated with each. For the reason below, the main table's
default locking is set to "all records."

- There is a piece of code that generates the barcode number,
incrementally, so the table's default locking has to be set to "all records"
to avoid 2 users accidentally assigning the same bcode # to two different
promotions.

In order to provide functionality needed by our company's point of sale
systems we need the ability to have multiple barcode #'s that have the same
first 8 digits [18 digits total, 8 unique followed by 10 zeros] with the very
last of the 10 zeros being changed to 1, 2, 3, etc. (i.e.
159001230000000001, 159001230000000002, 159001230000000003)

I have a piece of code that does an append query in order to let the user
fill out the form, assign the bcode#, then hit "copy" so the user doesn't
have to fill out the dates, etc all over again, and have the same bcode#. It
then unlocks the bcode# field to allow them to change the last digit.

PROBLEM THIS CREATES:
When the append query is activated it seems the table cannot be set to "lock
all records," if it is the query will not work. If I unlock the table we
have the possibility that two users could assign duplicate bcode#'s to
different promotions.

I'm no expert and self-taught and find setting up user-level security very
difficult. Is there any way to get around this problem without setting up
security? Any suggestions?

Thank you!!!
 
M

mscertified

Why not have a 'Prefix' table and a 'Suffix' table:

PREFIX table
ID
Prefix

SUFFIX table:
ID (of prefix)
Suffix

To create a barcode, first look in the Prefix table
To create a new suffix for an existing Prefix look in the Suffix table and
increment the number.
You need only lock the Suffix table record while it is being updated.

Maybe I don't fully understand your problem...

Dorian
 

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