P
Paul Fenton
We have a multiuser application where new client records get a file
number that's in the form Year (yyyy), Month (mm), Client (nnn), e.g.
200406005. Every month the client number resets to "1" and we
increment the month or year by one.
A table in the data file stores the next available client number and
the current month value. Every time a user opens a new record, the
program checks that stored month value against his computer's date and
if his date is > that stored, the stored value is incremented to match
his computer's month. There's additional code to deal with
December/January.
Been working fine for a couple years, but we just realized that if a
user's computer date was wrong, i.e. July instead of June, he would
increment the month from 6 to 7 and reset the client numbers back to
"1", even though we're still in the month of June. Subsequent
attempts to create a new record fail since the client numbers have
already been assigned.
I'm looking for a better way of assigning the file number that's less
dependent on the users' computer dates. Maybe it should be on the
server??
Paul Fenton
(e-mail address removed)
number that's in the form Year (yyyy), Month (mm), Client (nnn), e.g.
200406005. Every month the client number resets to "1" and we
increment the month or year by one.
A table in the data file stores the next available client number and
the current month value. Every time a user opens a new record, the
program checks that stored month value against his computer's date and
if his date is > that stored, the stored value is incremented to match
his computer's month. There's additional code to deal with
December/January.
Been working fine for a couple years, but we just realized that if a
user's computer date was wrong, i.e. July instead of June, he would
increment the month from 6 to 7 and reset the client numbers back to
"1", even though we're still in the month of June. Subsequent
attempts to create a new record fail since the client numbers have
already been assigned.
I'm looking for a better way of assigning the file number that's less
dependent on the users' computer dates. Maybe it should be on the
server??
Paul Fenton
(e-mail address removed)